react-native-permissions icon indicating copy to clipboard operation
react-native-permissions copied to clipboard

Denied from appstore

Open note89 opened this issue 10 years ago • 35 comments

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.

note89 avatar Oct 28 '16 18:10 note89

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>

bendellarocco avatar Nov 02 '16 15:11 bendellarocco

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

note89 avatar Nov 02 '16 16:11 note89

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.

bendellarocco avatar Nov 02 '16 16:11 bendellarocco

Is there any news?

xwartz avatar Dec 06 '16 02:12 xwartz

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.

yonahforst avatar Dec 07 '16 09:12 yonahforst

any news? it's a must.

edencakir avatar Jan 09 '17 19:01 edencakir

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?

jes-carr avatar Jan 12 '17 09:01 jes-carr

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 ?

Okipa avatar Jan 18 '17 10:01 Okipa

I am seeing this now too :/

hiddentao avatar Jan 18 '17 16:01 hiddentao

Same here! No need for calendar and bluetooth!

kesha-antonov avatar Jan 24 '17 10:01 kesha-antonov

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 avatar Feb 03 '17 10:02 yonahforst

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

edencakir avatar Feb 03 '17 10:02 edencakir

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?

yonahforst avatar Feb 03 '17 11:02 yonahforst

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.

matthijsdewit avatar Mar 11 '17 21:03 matthijsdewit

Quick bump. Has this issue been resolved?

mafelix avatar Mar 21 '17 17:03 mafelix

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.

gerwin3 avatar Mar 21 '17 21:03 gerwin3

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

flybayer avatar Mar 24 '17 15:03 flybayer

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

SandroMachado avatar Mar 30 '17 16:03 SandroMachado

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 avatar Apr 07 '17 14:04 yonahforst

@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

neo125874 avatar May 27 '17 20:05 neo125874