CameraDevice broken in macOS Mojave (10.14)

macOS Mojave features iOS-style OS-level privacy control for apps attempting to access recording devices like the camera or microphone. JUCE’s CameraDevice class for Mac currently just flies through opening recording devices and gets immediately killed by the OS.

Mojave is now released and CameraDevice still hasn’t been updated. AFAIK the AVFoundation APIs to request permissions are exactly the same as in iOS - you may be able to get away with reusing what’s in the iOS implementation with a handful of #ifdefs.

You’ll need to update the app’s plist to get the prompt. I’ve added boxes in the Projucer to control this in the same way as for iOS apps.

Beautiful! I thought it was more involved than that, as I had tried adding the plist entries manually and was still running into permissions issues. Cool work!

I noticed a typo in the commit…

This app requires requires audio input.


Thanks. Will get that fixed!

Hi @t0m,
Is there a way of disabling the microphone access in the camera device? My app only need the camera so I don’t want to add the microphone text to the info.plist…

1 Like