iOS10 权限崩溃问题
来源:互联网 发布:怎样购买空间和域名 编辑:程序博客网 时间:2024/05/20 14:28
手机升级了 iOS10,然后用正在开发的项目 装了个ipa包,发现点击有关 权限访问 直接Crash了,并在控制台输出了一些信息:
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 ”的Key,Value添加一个描述。
1,在项目中找到info.plist文件,右击有个 Open As,以Source Code 的形式打开
2,分别复制 以下 Value 和Key,Key 一定不能错,Value 貌似可以随便填写
相机权限描述:
<key>NSCameraUsageDescription</key><string>cameraDesciption</string>
通信录:
<key>NSContactsUsageDescription</key><string>contactsDesciption</string>
麦克风:
<key>NSMicrophoneUsageDescription</key><string>microphoneDesciption</string>
相机:
<key>NSPhotoLibraryUsageDescription</key><string>photoLibraryDesciption</string>
eg:其他权限描述,debug 控制台都会有输出的,自行添加就OK
3,在info.plist 文件上 复制上,然后 保存,如下图:
Source Code 的形式:
Property List 的展现形式:
4,Clean之后,运行就OK了
文/John_LS(简书作者)
原文链接:http://www.jianshu.com/p/83db0b4f0bfe
著作权归作者所有,转载请联系作者获得授权,并标注“简书作者”。
原文链接:http://www.jianshu.com/p/83db0b4f0bfe
著作权归作者所有,转载请联系作者获得授权,并标注“简书作者”。
0 0
- iOS10 权限崩溃问题
- iOS10 权限崩溃问题
- iOS10 权限崩溃问题
- iOS10 权限崩溃问题
- iOS10 权限崩溃问题
- iOS10 权限崩溃问题
- iOS10 权限崩溃问题
- iOS10 权限崩溃问题
- iOS10 权限崩溃问题
- iOS10 权限崩溃问题
- iOS10 权限崩溃问题
- iOS10 权限崩溃问题
- [绍棠] iOS中 iOS10 权限崩溃问题
- iOS中 iOS10 权限崩溃问题
- iOS开发中,iOS10权限崩溃问题
- iOS10 权限崩溃
- iOS10 权限访问崩溃
- iOS中 iOS10 权限崩溃问题 韩俊强的CSDN博客
- MYSQL explain详解
- yum
- 准备开始收集一些零散的知识了
- win10 uwp 异步进度条
- OTP算法
- iOS10 权限崩溃问题
- DFS(深度优先)算法编程实践
- linux 磁盘 2T以上的分区parted
- 机器学习中的相似性度量
- jsp 静态导入 与 动态导入
- Android jni/ndk编程一:jni初级认识与实战体验
- Service通过广播Broadcast更新Activity UI
- Gartner:分析、基础架构与云计算仍是政府CIO三大技术重点
- 输出字符串中字符的所有排列