大约一个月前,我在xcode上用cpp编写了一个程序,该程序使用Opencv打开了摄像机,并能够显示供稿。现在,当我运行它时,它会抛出[access] 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.
我认为唯一可以更改的是升级到Mac Mojave。这是错误的唯一来源,因为它以前曾经起作用过?或者我的项目中是否有其他原因导致此现象现在出现?
最佳答案
If you link on or after iOS 10, or on or after macOS 10.14, your app crashes if you try to access certain protected resources without providing a corresponding purpose string. Even if it’s not required, it’s always best to provide a usage string if your app uses a protected resource.
Accessing Protected Resources
关于xcode - 当我尝试通过OpenCv访问网络摄像头时,Xcode引发隐私错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54001800/