React-native-permissions: Denied from appstore

Created on 28 Oct 2016  Â·  35Comments  Â·  Source: zoontek/react-native-permissions

Dear developer,

We have discovered one or more issues with your recent delivery for "Ahead!". 
To process your delivery, the following issues must be corrected:

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

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.

Once these issues have been corrected, you can then redeliver the corrected binary.

Regards,

The App Store team

this is what i do

    _handleAppStateChange = (appState) => {
      if (appState == 'active') {
          /*
           Setup redux store with right permissions to be used accross the app
          */
          Permissions.checkMultiplePermissions(Permissions.getPermissionTypes())
              .then( status => {
                  this.props.dispatch_permissions_set_all_permissions(status);
              });
      }
    }

An at one point in my app i do this

: {text: 'Open Settings', onPress: Permissions.openSettings},

And this

Permissions.requestPermission("camera")

I don't se how this would affect the above mentioned permissions.


Most helpful comment

@yonahforst I think adding those descriptions to the info.plist is indeed a workaround. I've just submitted an app to AppStore using your library, and to descriptions part I just typed _We will never ask for this permission_ and somehow they didn't question it and published anyway.

All 35 comments

With IOS10 you now need to include permission keys in your info.plist

    <key>NSBluetoothPeripheralUsageDescription</key>
    <string>This will allow you to use your bluetooth to play terrible music</string>
    <key>NSCalendarsUsageDescription</key>
    <string>This will allow you to let us add calendar stuff</string>
    <key>NSCameraUsageDescription</key>
    <string>This will allow you to upload photos from your camera</string>
    <key>NSLocationWhenInUseUsageDescription</key>
    <string>let us know where you are</string>
    <key>NSPhotoLibraryUsageDescription</key>
    <string>This will allow you to upload photos p</string>

Sure we added that, but why do we need to add Bluetooth we don't want that ?

I am not sure why. I also was required to request that. The user will not see the request until you need it. Maybe its there just there incase.

Is there any news?

Just wanted to touch base. I'm completely caught up in another project, I hope to get back into react native in january and start addressing these issues. In the meantime, pull requests are welcome.

any news? it's a must.

I'm also getting the exact same 2 Info.plist errors when submitting. I'm only requesting permissions to the microphone Permissions.requestPermission('microphone'). It seems they are requested by default. Any idea if this will be fixed soon?

I have the same issue.
NSCalendarsUsageDescription and NSBluetoothPeripheralUsageDescription have been required by Apple in the Info.plist key to be accepted on the store.
Any news on that issue ?

I am seeing this now too :/

Same here!
No need for calendar and bluetooth!

So i'm going through this now; people are saying that apple searches your binary for references to privacy sensitive apis, and even if you never call them, they will still require usage descriptions.

http://stackoverflow.com/questions/39383289

I'm not sure how to solve this. Any suggestions? I don't want to require uses to include every permission usage description in their info.plist, but looks like their no way around it

@yonahforst I think adding those descriptions to the info.plist is indeed a workaround. I've just submitted an app to AppStore using your library, and to descriptions part I just typed _We will never ask for this permission_ and somehow they didn't question it and published anyway.

What about using an xcode build script to merge some default usage descriptions into the main info.plist? (being careful not to overwrite existing ones, of course).

I have zero experience with build scripts. Anyone care to comment if this is a good/bad idea?

If you don't use them, isn't it a solution to just remove them in the react-native-permissions package itself? I changed RNPTypes (line 7) in ReactNativePermissions.js and removed a few permission types. I don't know what happens behind the curtains, but they seem to be disabled. When running the example, it only displays the ones in RNPTypes.

Quick bump. Has this issue been resolved?

The issue can be temporarily fixed by removing RNPEvents.h, RNPEvents.m, RNPBluetooth.h, RNPBluetooth.m and uncommenting all the relevant lines from ReactNativePermissions.m and rebuilding your project.

I'm only using the camera, microphone, and photos and I had to remove all other code to pass iTunes connect processing.

I have a fork with those changes you can use like this:

    "dependencies": {
--      "react-native-permissions": "^0.2.7",
++      "react-native-permissions": "git://github.com/flybayer/react-native-permissions.git#only-camera-mic-photos",

I am experiencing the same issue. I think a note should be added to the README.md to inform the developers of this issue.

All - A friend suggested a solution.

1) Add a Run Script Phase which reads the main Info.plist and defines a preprocessor symbol for each permission key included.

2) inside the - (void)request:(void (^)(NSString *))completionHandler of each permission, use #if def to check if its preprocessor symbol is defined.

I'm shit at scripting. Does anyone want to volunteer to write this??

@yonahforst hi, is this npm version solve the issue? or just add them into plist? would it cause the app store rejection cause didn't use them?

thanks in advance

Any ETA on this?

@neo125874 @zoontek - there isn't much I can do. You just need to add the missing permission keys in info.plist. If you never request permission, they will never be shown to the user

You should close the issue as there will not be any changes about this.

I think this is a huge blocker. Not only it clutters our info.plist file but also leaves dummy text in there which will be displayed once that app needs that permission and the developer forgets to change that text.
It's unpleasing to say why I need something which I'll probably never need. And getting blocked on the AppStore cause of this seems at least cumbersome.

For now I'll go the manual way as I only need one geolocation.

But there is something you can do. I would suggest to break down this package into little ones like
@react-native-permissions/bluetooth
@react-native-permissions/location, etc
in order to make it just right.

Thanks for the work on this library!!

@pbassut I currently try finding time to create a v2 roadmap / alpha.

My goals are the following:

  • Split permissions logic / API between iOS and Android (it's easier to handle them by platform)
  • 1:1 mapping over PermissionsAndroid from the core (try being ready for the slimmening)
  • Use react-native link react-native-permissions to link the library core (the only step needed on Android)
  • Permissions requesters as Cocoapods subspecs:
pod 'RNPermissions', :path => '../node_modules/react-native-permissions/ios', :subspecs => [
    'AlwaysLocation',
    'WhenInUseLocation',
    'Camera',
    'Contacts',
    # Add any other permissions you want to use in your project
]

I love that. Specially number 4 which would solve for the issue highlighted here.

Any update on this? I'm getting the same thing. Pods would be so awesome

@evanjmg I'm working on it: https://github.com/yonahforst/react-native-permissions/pull/291
But doesn't really have time last weeks (I was looking for a new job, but found it!)

Is fixed yet?? because my app just got rejected.

Is fixed yet?? because my app just got rejected.

You should add permissions and explain them in the info.plist just like said here https://github.com/yonahforst/react-native-permissions/issues/46#issuecomment-257909361 . I fixed it this way.

As an alternative, If you don't want to add permissions, simply fork and delete the permission related files

For anyone who asking. That's what I added to my Info.plist for Apple store release version and it worked.

<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>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>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>
    <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>

Even if we add proper descriptions for all the permissions, Apple still frowns upon it. They still ask us to justify the usage. Any chances we can have this library and ask for the only permissions which we need and not all which this library supports?

The easiest way to use this is fork the library and remove the files on a per project basis; it’s pretty easy to use github in your package json.

On Sep 19, 2019, at 5:25 AM, Rupal notifications@github.com wrote:

Even if we add proper descriptions for all the permissions, Apple still frowns upon it. They still ask us to justify the usage. Any chances we can have this library and ask for the only permissions which we need and not all which this library supports?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Was this page helpful?
0 / 5 - 0 ratings