ios - 应用程序的 Info.plist 必须包含 NSContactsUsageDescription?

标签 ios

<分区>

使用 NSContactsUsageDescription 获取联系人列表时,出现以下错误。

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.

另外,在 swift 中获取整个联系人列表需要很长时间,而在 swift 3 中会出现此错误。

最佳答案

您必须在 info.plist 文件中添加以下键和值。

key: Privacy - Contacts Usage Description 

Value: Allow Contact Access

关于ios - 应用程序的 Info.plist 必须包含 NSContactsUsageDescription?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43342411/

相关文章:

ios - 在 iOS 12 上从 FCM 接收远程推送通知时播放自定义声音

ios - UICollectionView cellForItemAt indexPath 在 iOS 10 中跳过行索引

ios - 如何提高CGLayer的绘图质量

ios - 创建子实体并将属性向下移动实体层次结构

ios - RestKit 序列化创建重复条目

javascript - 仅当设备基于 iOS 时如何运行 jQuery 代码?

ios - 创建一个大的虚拟文件

ios - 尝试将存档提交到 App Store 时出现各种 ITMS 错误

ios - 你如何为组合 UICollectionViewLayouts 制作 NSCollectionLayoutVisibleItem 动画?

ios - 在 Cordova/WatchKit 应用程序上导入 MMWormhole