Cover image for Xcode Doesn't Allow Us to Use Webcam without asking

Xcode Doesn't Allow Us to Use Webcam without asking

kojikanao profile image Koji (he/him) ・1 min read

Today I wrote a simple script which is using the webcam with openFrameworks. It's been a while since I wrote oF script for the webcam.

Then, I got the following error.

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.

Obviously, Xcode told me that I don't allow you to use the webcam without telling the reason. This is the same as Swift/Objective-C when need to use a phone camera.

But, a little bit surprising to me lol.

The solution is to add the following to openFrameworks-Info.plist

    <string>Need to access your camera to capture a picture and record a video.</string>
    <string>Need to access your microphone to record a video.</string>

Posted on by:

kojikanao profile

Koji (he/him)


Looking for opportunities! Software Engineer in NYC/Research Resident@NYU-ITP18-19 Mostly I work with reactjs and sometimes python. code to do something weird/useless/helpful Japanese


markdown guide