Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rejected react native iOS app due to Missing Purpose String in Info.plist File from appstore

I got the following mail from appstore due to missing purpose string in info.plist file.

This is a React Native application that supports both iOS and Android.

My app is not requesting access to the user's calendar.

I thought the description only was mandatory if you actually requested a permission, or are these descriptions mandatory even if I never request to see the users calendar.

Missing Purpose String in Info.plist File - Your app's code references one or more APIs that access sensitive user data. The app's Info.plist file should contain a NSCalendarsUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. Starting Spring 2019, all apps submitted to the App Store that access user data will be required to include a purpose string.If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. You can contact the developer of the library or SDK and request they release a version of their code that doesn't contain the APIs. Learn more (https://developer.apple.com/documentation/uikit/core_app/protecting_the_user_s_privacy).

like image 416
IKKA Avatar asked Dec 04 '18 05:12

IKKA


1 Answers

Sometimes, packages you install will reference APIs that you don't really need. For example, react-native-permissions does this, and you must add a usage description for all the APIs they use.

The react-native-permissions package explains this here: https://github.com/yonahforst/react-native-permissions#app-store-submission-disclaimer

If you need to submit you application to the AppStore, you need to add to your Info.plist all *UsageDescription keys with a string value explaining to the user how the app uses this data. Even if you don't use them.

And this is an example of how your Info.plist file should look like:

<key>NSBluetoothPeripheralUsageDescription</key>
<string>Some description</string>
<key>NSCalendarsUsageDescription</key>
<string>Some description</string>
<key>NSCameraUsageDescription</key>
<string>Some description</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Some description</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>Some description</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>Some description</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Some description</string>
<key>NSSpeechRecognitionUsageDescription</key>
<string>Some description</string>
<key>NSAppleMusicUsageDescription</key>
<string>Some description</string>
<key>NSMotionUsageDescription</key>
<string>Some description</string>
like image 50
Luis Rizo Avatar answered Sep 29 '22 08:09

Luis Rizo