您的位置:首页 > 移动开发 > IOS开发

更新iOS10后相册、通讯录、话筒的权限崩溃问题

2016-09-23 21:42 459 查看

手机系统升级了 iOS10访问相册、通讯录、话筒出现以下崩溃信息:

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.

ps:你需要在info.plist文件 添加一个“NSContactsUsageDescription ”的Key,Value添加一个描述。

1,在项目中找到info.plist文件,右击有个 Open As,以Source Code 的形式打开

2,分别复制 以下 Value 和Key,Key 一定不能错,Value 貌似可以随便填写

相机权限描述:

Key:NSCameraUsageDescriptionType:StringValue:cameraDesciption

Key:NSContactsUsageDescriptionType:StringValue:contactsDesciption

Key:NSMicrophoneUsageDescriptionType:StringValue:microphoneDesciption

Key:NSPhotoLibraryUsageDescriptionType:StringValue:photoLibraryDesciption

然后,搞定!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: