AVFoundationMBS Authorization

Hi, I am experiencing an issue getting authorisation to use a video input device (i.e. the built in FaceTime Camera) on macOS. To test I am using the AVCaptureDevice Authorisation example project from MBS.

macOS Monterey version 12.3.1
MacBook Pro (14-inch 2021) Apple M1 Pro
Xojo 2021 Release 3.1
MBS Plugins version 22.0

To the example project I have added the NSCameraUsageDescription to the plist.

When the project is built for x86 64-bit, the project runs correctly, i.e. when I click on the ‘Request Video’ button, macOS pops up a window asking for permission to access the camera, which I allow and the requestAccessForMediaTypeCompleted event returns granted as true.
When I build the same project as Universal (as it will run as ARM on my machine), clicking the ‘Request Video’ button does not popup a dialog requesting permission to access the video camera and the requestAccessForMediaTypeCompleted event returns granted as false.
Does anyone have any idea why there is this difference between the build targets and why macOS does not ask for permission to access the video device on an ARM machine ?

Thanks for your help,


The info.plist entries are included in the program?
And on code signing you include the required entitlements?

Hi Christian, Thanks for the speedy response. I have check and the NSCameraUsageDescription plist entry is in the built applications plist. I am running the project in the Xojo debugger, so have not code signed the debug application. I will try code signing in the debugger.

I tried using Xojo 2022 Release 1 to code sign the app with no difference. I then tried using AppWrapper to code sign and set entitlements and it worked. Thanks for your help Christian.

1 Like

Yes, on M1 you need entitlements to be allowed to access the devices.