ios 10 个应用程序在访问相机时崩溃

ios 10 app crashes when accessing camera

我是 ios 的新手。我正在构建一个需要摄像头访问权限的应用程序,并且根据新要求,我已经在 info.plist 中添加了以下摄像头权限,但我仍然遇到以下异常。我还尝试在 phone 上清理并重新安装应用程序。有谁知道如何解决这个问题。

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.

您的隐私密钥值包含 $(PRODUCT_NAME),这似乎是出现此错误(仅适用于 iOS 10+)的原因.

将您的隐私密钥值更改为 字符串,如 "Used to capture new image for photo effect",它应该更正它。