应用程序由于缺少使用说明而被拒绝(Xcode8)

所以我今天收到了这封邮件,说我的应用程序的最新版本被 iTunes Connect 拒绝了,因为缺少了一些使用说明。确切地说:

这个应用程序试图访问隐私敏感的数据,没有使用说明。应用程序的 Info.plist 必须包含一个 NSContactsUsageDescription 键,该键带有一个字符串值,向用户解释应用程序如何使用这些数据。

这个应用程序试图访问隐私敏感的数据,没有使用说明。应用程序的 Info.plist 必须包含一个 NSCalendarsUsageDescription 键,该键带有一个字符串值,向用户解释应用程序如何使用这些数据。

这个应用程序试图访问隐私敏感的数据,没有使用说明。应用程序的 Info.plist 必须包含一个 NSPhotoLibraryUsageDescription 键,该键带有一个字符串值,向用户解释应用程序如何使用这些数据。

这个应用程序试图访问隐私敏感的数据,没有使用说明。应用程序的 Info.plist 必须包含一个 NSBluetoothperipheralUsageDescription 键,该键带有一个字符串值,向用户解释应用程序如何使用这些数据。

这个应用程序试图访问隐私敏感的数据,没有使用说明。应用程序的 Info.plist 必须包含一个 NSMicrophoneUsageDescription 键,该键带有一个字符串值,向用户解释应用程序如何使用这些数据。

这个应用程序试图访问隐私敏感的数据,没有使用说明。应用程序的 Info.plist 必须包含一个 NSMotionUsageDescription 键,该键带有一个字符串值,向用户解释应用程序如何使用这些数据。

一旦这些问题得到了纠正,您就可以重新交付已纠正的二进制文件。

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?

是因为我的一个依赖项(Cocoapods)可能包含一些代码来请求这些权限吗?或者,即使我从未要求查看用户日历、联系人等,这些描述也是强制性的吗?

81720 次浏览

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

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

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

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.

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

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

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

For anyone wondering why all of a sudden your app now has all these permission settings in the first place it could be because of CocoaPods or Carthage - they put in hooks to all of these permissions. I just upgraded my app to use cordova-plugin-firebasex which has an extensive Cocoapods (and dependencies) installation. You can turn these permissions off BEFORE you install cocoapods into your project by putting a PermissionsConfiguration.xcconfig in the root of your project - you can read more about this here: https://cocoapods.org/pods/Permission#installation

This all surprised me when the new version of my app was rejected with 7 permissions key/string missing from Info.plist file. I then had to dig into my project to find what was causing this since my app doesn't need or use any of these permissions (never has).

It may exist but at the moment I can't find a way to remove permissions after pods integration...going to have to dig around on how to do this without starting my project over.