Error when running opencvExample on newest xcode and OSx Mojave


I am currently working on the newly released nightly build. When attempting to use live video in the opencvexample I ran into this error when running the program:

So I tried adding 'Privacy - Camera…(Description of what the camera is being used for" as a key + description to the info.plist file to tell xcode the reason for using the camera.

However, now I am receiving this error:

If anyone knows what might be the source of this issue please let me know. I’ve tried cleaning, rebuilding, and exiting out of xcode lol. I may have to uninstall xcode and rollback to an earlier version…

This is only a guess. Might this be due to a privacy issue?
Could it be that your application is not enabled here: settings > security&privacy > camera ?

1 Like

if you are running on Xcode 9.4.1 you might try to run the app outside of Xcode (I noticed the plist wasn’t loading properly when I ran from within Xcode 9.4.1)

1 Like

Thanks for the reply! I checked privacy settings and it was enabled. But I am able to run it on its own outside of xcode.

Running the app outside of Xcode worked for me. Thanks for the suggestion!