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?


Solution 1:

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

Solution 2:

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

Solution 3:

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

Solution 4:

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.