App rejected due to missing usage descriptions (Xcode8)

80,806

Solution 1

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 2

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

Solution 5

Calendar : Key : Privacy - Calendars Usage Description
Value : $(PRODUCT_NAME) calendar events

Reminder : Key : Privacy - Reminders Usage Description
Value : $(PRODUCT_NAME) reminder use

Contact : Key : Privacy - Contacts Usage Description
Value : $(PRODUCT_NAME) contact use

Photo : Key : Privacy - Photo Library Usage Description
Value : $(PRODUCT_NAME) photo use

Bluetooth Sharing : Key : Privacy - Bluetooth Peripheral Usage Description
Value : $(PRODUCT_NAME) Bluetooth Peripheral use

Microphone : Key : Privacy - Microphone Usage Description
Value : $(PRODUCT_NAME) microphone use

Camera : Key : Privacy - Camera Usage Description
Value : $(PRODUCT_NAME) camera use

Location : Key : Privacy - Location Always Usage Description
Value : $(PRODUCT_NAME) location use

Key : Privacy - Location When In Use Usage Description
Value : $(PRODUCT_NAME) location use

Heath : Key : Privacy - Health Share Usage Description
Value : $(PRODUCT_NAME) heath share use

Key : Privacy - Health Update Usage Description
Value : $(PRODUCT_NAME) heath update use

HomeKit : Key : Privacy - HomeKit Usage Description
Value : $(PRODUCT_NAME) home kit use

Media Library : Key : Privacy - Media Library Usage Description
Value : $(PRODUCT_NAME) media library use

Motion : Key : Privacy - Motion Usage Description
Value : $(PRODUCT_NAME) motion use

Speech Recognition : Key : Privacy - Speech Recognition Usage Description
Value : $(PRODUCT_NAME) speech use

SiriKit : Key : Privacy - Siri Usage Description
Value : $(PRODUCT_NAME) siri use

TV Provider : Key : Privacy - TV Provider Usage Description
Value : $(PRODUCT_NAME) tvProvider use

Share:
80,806
KimHafr
Author by

KimHafr

Updated on July 08, 2022

Comments

  • KimHafr
    KimHafr almost 2 years

    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?

  • KimHafr
    KimHafr over 7 years
    I couldn't for the life of me imagine that I would add a library requesting all these permissions. But it was so obvious when I found it: github.com/nickoneill/PermissionScope
  • Matthew Seaman
    Matthew Seaman over 7 years
    Yeah a framework like that might not be a great idea because it causes your app to declare way more permissions than it needs.
  • Tarvo Mäesepp
    Tarvo Mäesepp over 7 years
    @KimAMartinsen What the hell. Your question saved me and the comment right here. Is it some kind of bug with PermissionScope? I really need it but it is impossible to use if I get errors like this :D
  • KimHafr
    KimHafr over 7 years
    I guess this is more of a feature then a bug.. iTunes Connect detects that somewhere in your app, someone might request permissions. In that case you have to fill in usage descriptions for all of these, in case you might actually invoke some of the code in permissionscope. I like the framework as well and I'm not ready to replace it. So i filled in some bogus text, and the app was approved. I've submitted it in to the AppStore, so hopefully it will be ok :-)
  • neobie
    neobie over 7 years
    Need a way to detect which framework is requesting those permission?
  • Nitesh
    Nitesh about 7 years
    Neobie - did you find how you can detect the frameworks requesting the permissions?
  • backslash-f
    backslash-f over 6 years
    Shouldn't it be "${PRODUCT_NAME}" instead of "$(PRODUCT_NAME)"? "{}" instead of "()".
  • Jayesh Thanki
    Jayesh Thanki over 6 years
    @backslash-f, Please check existing plist file in new project and it should be $(PRODUCT_NAME). You can see default property like Bundle name in plist file.
  • L N
    L N about 5 years
  • L N
    L N about 5 years
  • O'Rooney
    O'Rooney over 4 years
    Please note a generic description like this will no longer get you through the app store approval. We were just dinged twice for similar descriptions. You have to describe the real usage for a human