IOS10 相册相机闪退bug解决办法
程序员文章站
2024-02-17 09:49:10
ios10系统下调用系统相册、相机功能,遇到闪退的情况,描述如下:
this app has crashed because it attempted to ac...
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>
感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!