1. 程式人生 > >解決關於ios訪問相機閃退問題

解決關於ios訪問相機閃退問題

value ive 調用 .cn spa div 蘋果 pri exp

在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在調用相機的時候出現崩潰的問題了。

解決關於ios訪問相機閃退問題