I tried running some basic code from OpenCV that opens the webcam. I was able to run this code before I updated to Mac Mojave, but afterwards I get this error when I build and run.
`[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.`
I followed steps on other posts and created the Info.plist in the project(same directory as main.cpp) , however it says it has a problem parsing the contents on the Info.plist.
Info.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSCameraUsageDescription</key>
<string>uses camera to see vision targets</string>
</dict>
How can I fix this problem and have it read the Info.plist?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…