MZP
MZP

Reputation: 61

Xcode throws privacy error when I try accessing the webcam through OpenCv

About a month ago I wrote a program in cpp on xcode that opened the camera with Opencv and was able to show the feed. Now, when I run it it throws

[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.

the only thing that I think could have changed was upgrading to Mac Mojave. It this the only source of the error since it worked before? Or can something else in my project be causing this to appear now?

Upvotes: 0

Views: 193

Answers (1)

pseudon
pseudon

Reputation: 235

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

Upvotes: 1

Related Questions