CameraDevice broken in macOS Mojave (10.14)


#1

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 compatibility
#2

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.


#3

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.


#4

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!


#5

I noticed a typo in the commit…

This app requires requires audio input.

Rail


#6

Thanks. Will get that fixed!