iOS开发-解决iOS10相册相机闪退

来源:互联网 发布:室内位置大数据 编辑:程序博客网 时间:2024/05/01 10:27

问题描述:

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 NSPhotoLibraryUsageDescription key with a string value explaining to the user how the app uses this data.

解决方法:

在info.plist文件下添加

相机权限

<key>NSCameraUsageDescription</key>

<string>cameraDesciption</string>

相册权限

<key>NSPhotoLibraryUsageDescription</key>

<string>photoLibraryDesciption</string>



0 0
原创粉丝点击