崩溃:[access] This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSPhotoLibraryUsageDescription key with a string value explaining to the user how the app uses this data.app
这个是拍照动做引发的崩溃,在升Xcode+iOS10以前都是好的,升级以后,须要在plist文件中添加相册权限。相应的麦克风,通信录,若是项目中涉及到了,也须要添加相应的权限。报错的相应key值:ide
通讯录:NSContactsUsageDescriptionthis
麦克风:NSMicrophoneUsageDescriptioncode
相册:NSPhotoLibraryUsageDescription视频
这里仅以相册的为例:ip
plist文件里面添加,Privacy - Photo Library Usage Description,Value值为描述,弹出的提示框会显示出来。string
升到iOS10以后,须要设置权限的有:it
- 麦克风权限:Privacy - Microphone Usage Description 是否容许此App使用你的麦克风?
- 相机权限: Privacy - Camera Usage Description 是否容许此App使用你的相机?
- 相册权限: Privacy - Photo Library Usage Description 是否容许此App访问你的媒体资料库?
- 通信录权限: Privacy - Contacts Usage Description 是否容许此App访问你的通信录?
- 蓝牙权限:Privacy - Bluetooth Peripheral Usage Description 是否许允此App使用蓝牙?
- 语音转文字权限:Privacy - Speech Recognition Usage Description 是否容许此App使用语音识别?
- 日历权限:Privacy - Calendars Usage Description
- 定位权限:Privacy - Location When In Use Usage Description
- 定位权限: Privacy - Location Always Usage Description
- 位置权限:Privacy - Location Usage Description
- 媒体库权限:Privacy - Media Library Usage Description
- 健康分享权限:Privacy - Health Share Usage Description
- 健康更新权限:Privacy - Health Update Usage Description
- 运动使用权限:Privacy - Motion Usage Description
- 音乐权限:Privacy - Music Usage Description
- 提醒使用权限:Privacy - Reminders Usage Description
- Siri使用权限:Privacy - Siri Usage Description
- 电视供应商使用权限:Privacy - TV Provider Usage Description
- 视频用户帐号使用权限:Privacy - Video Subscriber Account Usage Description