简体   繁体   English

由于隐私敏感数据,应用程序在 iOS 11 上崩溃

[英]Application crashing on iOS 11 due to privacy-sensitive data

My app was working smoothly in iOS 10 but not as i updated the application to iOS 11, application started to crash.我的应用程序在 iOS 10 中运行顺利,但当我将应用程序更新到 iOS 11 时,应用程序开始崩溃。 And I am getting following error:我收到以下错误:

This app has crashed because it attempted 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.

As your error is suggesting just add由于您的错误提示只需添加

"Privacy - Contacts Usage Description" 

into your info.plist.进入你的 info.plist。 It will be of String type so add whatever popup message you want to show to the user asking for accessing his/her contact list.它将是字符串类型,因此添加您想要向用户显示的任何弹出消息,要求访问他/她的联系人列表。 Eg.例如。 you may write "Application wants to access your contacts list."您可以写“应用程序想要访问您的联系人列表”。

Key will be "Privacy - Contacts Usage Description"
and 
Value will be "Application wants to access your contacts list."

It is due to because you are trying to access sensitive data without seeking permission.这是因为您试图在未经许可的情况下访问敏感数据。 To avoid this, you need to add a entry in your info.plist file in your all targets.为避免这种情况,您需要在所有目标的 info.plist 文件中添加一个条目。 And specify the valid reason to access sensitive data.并指定访问敏感数据的正当理由。

Thanks谢谢

You must declare access to any user private data types.您必须声明对任何用户私有数据类型的访问权限。 You do this by adding a usage key to your app's Info.plist together with a purpose string.您可以通过向应用程序的 Info.plist 添加一个使用密钥和一个目的字符串来实现这一点。

<key>NSPhotoLibraryUsageDescription</key>
<string>$(PRODUCT_NAME) photo use</string>

<key>NSCameraUsageDescription</key>
<string>$(PRODUCT_NAME) camera use</string>

<key>NSMicrophoneUsageDescription</key>
<string>$(PRODUCT_NAME) microphone use</string>

<key>NSLocationUsageDescription</key>
<string>$(PRODUCT_NAME) location use</string>

<key>NSLocationWhenInUseUsageDescription</key>
<string>$(PRODUCT_NAME) location use</string>

<key>NSLocationAlwaysUsageDescription</key>
<string>$(PRODUCT_NAME) always uses location </string>

<key>NSCalendarsUsageDescription</key>
<string>$(PRODUCT_NAME) calendar events</string>

<key>NSRemindersUsageDescription</key>
<string>$(PRODUCT_NAME) reminder use</string>

<key>NSContactsUsageDescription</key>
<string>$(PRODUCT_NAME) contact use</string>

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

<key>NSHealthUpdateUsageDescription</key>
<string>$(PRODUCT_NAME) heath update use</string>

<key>NSHealthShareUsageDescription</key>
<string>$(PRODUCT_NAME) heath share use</string>

<key>NSBluetoothPeripheralUsageDescription</key>
<string>$(PRODUCT_NAME) Bluetooth Peripheral use</string>

<key>NSAppleMusicUsageDescription</key>
<string>$(PRODUCT_NAME) media library use</string>

<key>NSSiriUsageDescription</key>
<string>$(PRODUCT_NAME) siri use</string>

<key>NSHomeKitUsageDescription</key>
<string>$(PRODUCT_NAME) home kit use</string>

<key>NSSpeechRecognitionUsageDescription</key>
<string>$(PRODUCT_NAME) speech use</string>

<key>NSVideoSubscriberAccountUsageDescription</key>
<string>$(PRODUCT_NAME) tvProvider use</string>

You can read all the Privacy descriptions here .您可以在此处阅读所有隐私说明。

<key>NSContactsUsageDescription</key>
<string>Required to show list of contacts</string>

just write this into your info.plist file.只需将其写入您的info.plist文件即可。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 由于 GoogleSignIn 和 AdMob,iOS 10 GM 在提交应用程序时出现“应用程序尝试访问没有使用说明的隐私敏感数据”的发布错误 - iOS 10 GM release error when submitting apps "app attempts to access privacy-sensitive data without a usage description" due to GoogleSignIn, AdMob iOS10应用程序已崩溃,因为它尝试访问对隐私敏感的数据 - iOS10 app has crashed because it attempted to access privacy-sensitive data iOS 10 应用程序崩溃,因为它试图访问隐私敏感数据 - iOS 10 App has crashed because it attempted to access privacy-sensitive data 该应用已崩溃,因为它试图访问对隐私敏感的数据 - This app has crashed because it attempted to access privacy-sensitive data iTunes发送存档失败,隐私敏感数据 - iTunes Send Archive Failed, privacy-sensitive data xctest 此应用程序试图在没有使用说明的情况下访问隐私敏感数据 - xctest This app has attempted to access privacy-sensitive data without a usage description 此应用已崩溃,因为它尝试访问没有使用说明的隐私敏感数据,即使使用使用说明也是如此 - This app has crashed because it attempted to access privacy-sensitive data without a usage description, even with usage description 应用程序被拒绝:查找(cocoapod)库访问隐私敏感数据的系统方法 - App rejected: Systematic way to find (cocoapod) library that accesses privacy-sensitive data Phonegap应用程序NSCalendarsUsageDescription错误:此应用程序尝试访问对隐私敏感的数据,而没有使用说明 - Phonegap app NSCalendarsUsageDescription error:This app attempts to access privacy-sensitive data without a usage description NSPhotoLibraryUsageDescription键已添加到info.plist,由于隐私敏感数据仍然崩溃 - NSPhotoLibraryUsageDescription key added to info.plist, still crashing due to privacy sensitive data
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM