Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

App rejected due to missing usage descriptions (Xcode8)

So I got this mail today saying that the latest build of my app was rejected by iTunes Connect due to some missing usage descriptions. To be exact:

This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSContactsUsageDescription 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 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 NSPhotoLibraryUsageDescription 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.

This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSMicrophoneUsageDescription 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 NSMotionUsageDescription 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.

I figured out that these have become mandatory with iOS 10, but the only problem is that my app is not requesting permission to access any of these.. I thought the description only was mandatory if you actually requested a permission?

Is it because one of my dependencies (Cocoapods) might contain some code to request these permissions? Or are these descriptions mandatory even if I never request to see the users calendar, contacts, etc?

like image 426
KimHafr Avatar asked Sep 09 '16 16:09

KimHafr


4 Answers

iOS 10 must add permission in info.plist just review this BLOG :- settings-in-ios-10 you get all idea.

Add permission in info.plist file base on your error log.

Note: Write proper reason for permission in string value otherwise apple reject app again.

NSCameraUsageDescription

<key>NSCameraUsageDescription</key>
    <string>You have to describe the real usage for a human.</string>

NSContactsUsageDescription

<key>NSContactsUsageDescription</key>
    <string>You have to describe the real usage for a human.</string>

NSPhotoLibraryUsageDescription

<key>NSPhotoLibraryUsageDescription</key>
    <string>You have to describe the real usage for a human.</string>

NSBluetoothPeripheralUsageDescription

<key>NSBluetoothPeripheralUsageDescription</key>
    <string>You have to describe the real usage for a human.</string>

NSMicrophoneUsageDescription

<key>NSMicrophoneUsageDescription</key>
    <string>You have to describe the real usage for a human.</string>

NSMotionUsageDescription

<key>NSMotionUsageDescription</key>
    <string>$(PRODUCT_NAME) motion use.</string>

NSLocationAlwaysUsageDescription

<key>NSLocationAlwaysUsageDescription</key>
    <string>You have to describe the real usage for a human.</string>

NSLocationUsageDescription

<key>NSLocationUsageDescription</key>
    <string>You have to describe the real usage for a human.</string>

NSLocationWhenInUseUsageDescription

<key>NSLocationWhenInUseUsageDescription</key>
    <string>You have to describe the real usage for a human.</string>

NSRemindersUsageDescription

<key>NSRemindersUsageDescription</key>
    <string>You have to describe the real usage for a human.</string>

NSSiriUsageDescription

<key>NSSiriUsageDescription</key>
    <string>You have to describe the real usage for a human.</string>

NSVideoSubscriberAccountUsageDescription

<key>NSVideoSubscriberAccountUsageDescription</key>
    <string>You have to describe the real usage for a human.</string>

NSSpeechRecognitionUsageDescription

<key>NSSpeechRecognitionUsageDescription</key>
    <string>You have to describe the real usage for a human.</string>

NSCalendarsUsageDescription

<key>NSCalendarsUsageDescription</key>
    <string>You have to describe the real usage for a human.</string>

enter image description here

like image 198
Mitul Marsoniya Avatar answered Nov 16 '22 12:11

Mitul Marsoniya


The descriptions are mandatory for any content you or any frameworks you link against attempt to access. The errors are generated upon an attempt to access the content if a usage description was not supplied, so if you're getting those errors your app must be requesting them. You should discover why your app or its frameworks require these and add appropriate usage descriptions to your app's info.plist.

Or more ideally, if you don't need access, see if there's a way to not request it (or use frameworks that do unnecessarily).

like image 33
Matthew Seaman Avatar answered Nov 16 '22 13:11

Matthew Seaman


You can add in your info.plist like :

<key>NSCalendarsUsageDescription</key>
    <string>Explain the reasons for accessing...</string>
    <key>NSPhotoLibraryUsageDescription</key>
    <string>Explain the reasons for accessing...</string>
    <key>NSBluetoothPeripheralUsageDescription</key>
    <string>Explain the reasons for accessing...</string>

etc.

Hope will help someone...

like image 9
mgyky Avatar answered Nov 16 '22 12:11

mgyky


I had the same issue, and it appears that if any framework you link against has code that asks this permission (even if your app never requests them), the usage descriptions are necessary. But according to my test, if you don't request them, they won't appear in the permissions list of your app.

like image 6
Dielson Sales Avatar answered Nov 16 '22 11:11

Dielson Sales