简体   繁体   English

应用的 Info.plist 必须包含一个 NSContactsUsageDescription 键

[英]The app's Info.plist must contain an NSContactsUsageDescription key

I am getting a crash below:我在下面遇到崩溃:

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.应用的 Info.plist 必须包含一个 NSContactsUsageDescription 键和一个字符串值,向用户解释应用如何使用这些数据。

But I have already added the 'Privacy - Contacts Usage Description' key但我已经添加了“隐私 - 联系人使用说明”键

在此处输入图像描述

请检查您的.plist作为源代码,看看您的密钥结尾是否不包含空格,例如:

<key>NSContactsUsageDescription </key>

Could be that you have accidentally added the key to your UITests target. 可能是您不小心将密钥添加到了UITests目标。 I've done that a few times with the location privacy keys. 我已经使用位置隐私密钥完成了几次。

By the way, your contacts usage description "Allow contact access" probably would not pass Apple's review, because it does not state why you want to use them. 顺便说一句,您的联系人使用情况描述“允许联系人访问”可能不会通过Apple的审查,因为它没有说明为什么要使用它们。

if you are using App test and and App UItest then there would be multple plist files in your project just make it sure you are adding discription in right if plist 如果您使用的是App test和App UItest,则项目中将存在多个plist文件,只需确保在plist中添加了说明即可

在此处输入图片说明

Go To info.plist And转到 info.plist 和

Privacy - Contacts Usage Description隐私 - 联系人使用说明

Value : Allow Contact Access For Details值:允许联系人访问以获取详细信息

enter image description here在此处输入图像描述

I had this problem.我有这个问题。 There was no Info.plist in a new project and adding it didn't do anything.新项目中没有 Info.plist 并且添加它没有任何作用。

Solution:解决方案:

  • Click project点击项目
  • Select Info tab选择Info选项卡
  • HERE you can add stuff!在这里你可以添加东西!

暂无
暂无

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

相关问题 应用程序的 Info.plist 必须包含 NSMotionUsageDescription 键 - The app's Info.plist must contain an NSMotionUsageDescription key 要将此应用配置为iOS路由应用,应用的Info.plist必须包含MKDirectionsApplicationSupportedModes键 - To configure this app as an iOS routing app, the app's Info.plist must contain the MKDirectionsApplicationSupportedModes key 应用程序的 Info.plist 必须包含 NSLocationAlwaysUsageDescription 和 NSLocationWhenInUseUsageDescription。 - The app's Info.plist must contain NSLocationAlwaysUsageDescription & NSLocationWhenInUseUsageDescription. 什么是“应用程序的Info.plist必须包含NSPhotoLibraryAddUsageDescription”的崩溃? - What is the crash of “The app's Info.plist must contain an NSPhotoLibraryAddUsageDescription”? iOS 12-“应用程序的Info.plist必须包含NSMicrophoneUsageDescription密钥” - iOS 12 - “The app's Info.plist must contain an NSMicrophoneUsageDescription key” 错误 ITMS-90513:缺少 Info.plist 键。 您的应用程序的 Info.plist 必须包含“TVTopShelfImage.TVTopShelfPrimaryImageWide”键 - ERROR ITMS-90513: Missing Info.plist Key. Your app's Info.plist must contain the 'TVTopShelfImage.TVTopShelfPrimaryImageWide' key 错误ITMS-90642:“缺少Info.plist密钥。 您应用的info.plist必须包含“MSMessagesExtensionStoreIconName”键。“ - ERROR ITMS-90642: “Missing Info.plist Key. Your app's info.plist must contain the 'MSMessagesExtensionStoreIconName' key.” App Store意外拒绝:NSMotionUsageDescription和NSContactsUsageDescription缺少Info.Plist - Unexpected App Store rejection: Missing Info.Plist for NSMotionUsageDescription and NSContactsUsageDescription 应用程序的 Info.plist 必须包含一个 NSCameraUsageDescription 键和一个字符串值,向用户解释应用程序如何使用这些数据 - The app's Info.plist must contain an NSCameraUsageDescription key with a string value explaining to the user how the app uses this data 应用程序的 Info.plist 必须包含一个 NSMicrophoneUsageDescription 键和一个字符串值,向用户解释应用程序如何使用此数据 - The app's Info.plist must contain an NSMicrophoneUsageDescription key with a string value explaining to the user how the app uses this data
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM