gpt4 book ai didi

swift - 访问相机时 ios 10 应用程序崩溃

转载 作者:搜寻专家 更新时间:2023-10-31 22:19:41 25 4
gpt4 key购买 nike

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

info.plit enter image description here

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.

最佳答案

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

将您的隐私 key 值更改为字符串,例如“用于拍摄新图像以实现照片效果”,它应该会更正它。

关于swift - 访问相机时 ios 10 应用程序崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42597172/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com