ios 10 app crashes when accessing camera

浪子不回头ぞ 提交于 2019-12-10 21:23:24

问题


I am new to ios. I am building an app which requires camera access, and according to new requirements I have already added following camera permission in info.plist but still I am getting following exception. I have also tried cleaning and reinstalling app on my phone. Does any one know how to fix this.

info.plit

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.


回答1:


Your privacy key value contains $(PRODUCT_NAME), which appears to be the reason that this error (only for iOS 10+) appears.

Change your privacy key value to a pure string like "Used to capture new image for photo effect" and it should correct it.



来源:https://stackoverflow.com/questions/42597172/ios-10-app-crashes-when-accessing-camera

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!