当前位置 : 主页 > 手机开发 > ios >

IOS10 相册相机闪退bug解决办法

来源:互联网 收集:自由互联 发布时间:2021-05-10
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 NSPhotoLib

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>

感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!

网友评论