解决关于ios访问相机闪退问题

在mac上的ionic3项目打包成苹果app,系统版本是10.3.3 .

当调用相机的时候出现闪退情况,这是调试出现的问题:

This app has crashed because it attempted to access privacy-sensitive data without a usage description.  The app's Info.plist must contain an NSCameraUsageDescription key with a string value explaining to the user how the app uses this data.

解决方案:

使用xcode 打开xxx.pbxproj

打开Info.plist直接添加

 

或者直接添加

 

<key>NSCameraUsageDescription</key>
<string>cameraDesciption</string>

加上上面这个 就不会出现app在调用相机的时候出现崩溃的问题了。

posted @ 2017-08-10 17:56  huangenai  阅读(1627)  评论(0编辑  收藏  举报