React-native-permissions: App Rejected in AppStore

Created on 31 Jul 2018  Â·  22Comments  Â·  Source: zoontek/react-native-permissions

Describe your environment

  • React-Native version
  • Platform: iOS
  • Device (which one?): Appstore dist
  • react-native-permissions 1.1.1
  • Devtools: Xcode

How to repeat issue and example

Add "react-native-permissions": "^1.1.1", to package.json and submit to AppStore to use it only to detect a single permission.

Apple Rejects app:

Dear Developer,

We identified one or more issues with a recent delivery for your app, "XXXX". Please correct the following issues, then upload again.

Missing Info.plist key - This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSBluetoothPeripheralUsageDescription key with a string value explaining to the user how the app uses this data.

Missing Info.plist key - This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSAppleMusicUsageDescription key with a string value explaining to the user how the app uses this data.

Missing Info.plist key - This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSMotionUsageDescription key with a string value explaining to the user how the app uses this data.

Missing Info.plist key - This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSSpeechRecognitionUsageDescription key with a string value explaining to the user how the app uses this data.

Best regards,

The App Store Team

I only need it to detect push notifications, not bluetooth, speech recognition, etc.

Solution

Deprecate this library and split the logic detection into multiple libraries with a single detection feature per library that only link to specific apple frameworks.

Most helpful comment

I actually submitted my app with that suggestion the day I posted it and it's accepted! :)

Again, they just want a reasonable enough explanation as to why your code references those permissions, even if it's not utilizing them in a functional way. Worked like a charm! Just make sure you include all the pertinent permissions listed in the readme.

Example of mine below:

<key>NSBluetoothPeripheralUsageDescription</key> <string>Our app does not request this permission or utilize this functionality but it is included in our info.plist since our app utilizes the react-native-permissions library, which references this permission in its code.</string> <key>NSCalendarsUsageDescription</key> <string>Our app does not request this permission or utilize this functionality but it is included in our info.plist since our app utilizes the react-native-permissions library, which references this permission in its code.</string> <key>NSCameraUsageDescription</key> <string>Our app does not request this permission or utilize this functionality but it is included in our info.plist since our app utilizes the react-native-permissions library, which references this permission in its code.</string> <key>NSLocationWhenInUseUsageDescription</key> <string>Our app does not request this permission or utilize this functionality but it is included in our info.plist since our app utilizes the react-native-permissions library, which references this permission in its code.</string> <key>NSPhotoLibraryAddUsageDescription</key> <string>Our app does not request this permission or utilize this functionality but it is included in our info.plist since our app utilizes the react-native-permissions library, which references this permission in its code.</string> <key>NSPhotoLibraryUsageDescription</key> <string>Our app does not request this permission or utilize this functionality but it is included in our info.plist since our app utilizes the react-native-permissions library, which references this permission in its code.</string> <key>NSSpeechRecognitionUsageDescription</key> <string>Our app does not request this permission or utilize this functionality but it is included in our info.plist since our app utilizes the react-native-permissions library, which references this permission in its code.</string> <key>NSAppleMusicUsageDescription</key> <string>Our app does not request this permission or utilize this functionality but it is included in our info.plist since our app utilizes the react-native-permissions library, which references this permission in its code.</string> <key>NSMotionUsageDescription</key> <string>Our app does not request this permission or utilize this functionality but it is included in our info.plist since our app utilizes the react-native-permissions library, which references this permission in its code.</string>

All 22 comments

It does actually explain in the readme that you need to add some keys to the plist.

App Store submission disclaimer

Did you include the items in your plist?

I've just received App Store Review Team's notice. They told me the info.plist should include the description with more realistic "usage example". To avoid rejection I'd suggest fork this repo and remove unnecessary permissions.

Yeah that’s what they say, if you declare permissions in plist you better include why your app would need to prompt for these permissions. “usage example” doesn’t cut it anymore hence why I suggest we leave this repo for Android only and split each permission in it’s own module.

We are also being rejected for this reason - We obviously have no need for Apple Music so there's nothing in the permissions info.plist that we can put for that.

Looks like this means that including this library in your react-native project will mean that you cannot submit an iOS app to the app store unless you are using every single on of the permissions.

In the description have you tried simply entering something like "This permission is requested for the purpose of utilizing the react-native-permissions library and is not actually used by the app"?

The library references lots of different permissions so that you can properly call the ones you need within your app, but apple isn't able to tell that they are not being used, it can only see that they are referenced in the code of this library.

If "Usage Example" isn't sufficient anymore, a full explanation of why your library mentions all of these permissions seems like what they're looking for, no?

Has anyone had any success with @Gradner suggestion?

I actually submitted my app with that suggestion the day I posted it and it's accepted! :)

Again, they just want a reasonable enough explanation as to why your code references those permissions, even if it's not utilizing them in a functional way. Worked like a charm! Just make sure you include all the pertinent permissions listed in the readme.

Example of mine below:

<key>NSBluetoothPeripheralUsageDescription</key> <string>Our app does not request this permission or utilize this functionality but it is included in our info.plist since our app utilizes the react-native-permissions library, which references this permission in its code.</string> <key>NSCalendarsUsageDescription</key> <string>Our app does not request this permission or utilize this functionality but it is included in our info.plist since our app utilizes the react-native-permissions library, which references this permission in its code.</string> <key>NSCameraUsageDescription</key> <string>Our app does not request this permission or utilize this functionality but it is included in our info.plist since our app utilizes the react-native-permissions library, which references this permission in its code.</string> <key>NSLocationWhenInUseUsageDescription</key> <string>Our app does not request this permission or utilize this functionality but it is included in our info.plist since our app utilizes the react-native-permissions library, which references this permission in its code.</string> <key>NSPhotoLibraryAddUsageDescription</key> <string>Our app does not request this permission or utilize this functionality but it is included in our info.plist since our app utilizes the react-native-permissions library, which references this permission in its code.</string> <key>NSPhotoLibraryUsageDescription</key> <string>Our app does not request this permission or utilize this functionality but it is included in our info.plist since our app utilizes the react-native-permissions library, which references this permission in its code.</string> <key>NSSpeechRecognitionUsageDescription</key> <string>Our app does not request this permission or utilize this functionality but it is included in our info.plist since our app utilizes the react-native-permissions library, which references this permission in its code.</string> <key>NSAppleMusicUsageDescription</key> <string>Our app does not request this permission or utilize this functionality but it is included in our info.plist since our app utilizes the react-native-permissions library, which references this permission in its code.</string> <key>NSMotionUsageDescription</key> <string>Our app does not request this permission or utilize this functionality but it is included in our info.plist since our app utilizes the react-native-permissions library, which references this permission in its code.</string>

Here is a fork that doesn't have 'event', 'reminder', 'bluetooth', 'speechRecognition', or Apple Music.

https://github.com/woodpav/react-native-permissions

Relevant commit: https://github.com/woodpav/react-native-permissions/commit/7034bc8b485d580967e2b2469846eca1da60cfbb

We started using this library but didn't want to have a phantom usage descriptions, so I've created #276
to selectively include permission code when really used.

@woodpav Thank you for this fork! I started using it today.

Any particular reason why you left the Motion Usage permission in there? I just tried to submit an app to the using your fork and this is the last issue Apple is complaining about.

@timkuilman I'm using motion ;) Take a look at the commit to remove it on your fork.

I am closing this since this issue does not exists anymore with the 2.0.0 release.

For those that get caught out removing it in v2 like I did. Permission-MediaLibrary and Permission-StoreKit both use NSAppleMusicUsageDescription. You can search in your node modules folder for the permission to see which module is using it.

It reproduced on 2.2.0

Im using 2.2.2 and the NSAppleMusicUsageDescription bug is still happening.

@ghost I am using 3.0.2. is NSAppleMusicUsageDescription bug still exists in latest version as well. I haven't check it since I have not submitted my app to store.So can you please let me know if you had already submitted app to store.?

@zoontek Has this issue been completely resolved in recent versions?

If you are not using a module that requires it (apparently MediaLibrary and StoreKit) from the above then it should be fine. If you are then you need to include the description. You should try it and report back.

@mikehardy I am using MediaLibrary and mentioned it in info.plist. But not StoreKit. Now , Do I have to mention about store kit as well?

@Yandamuri I don't use those modules so I don't have a definitive answer. Suggest looking at the actual implementation to see the actual iOS API calls made, check the related documentation and verify directly. A bit tedious but way better than waiting for an App Store review / reject / re-submit cycle.

@zoontek Can you please confirm that issue raised by @ghost is resolved in recent releases. so that I can confidently submit my app to the store. Thank You.

@Yandamuri I don't use this kind of permissions either. Please submit yours and give feedback.

Was this page helpful?
0 / 5 - 0 ratings