# AVFoundationMBS Authorization

**URL:** <https://forum.xojo.com/t/avfoundationmbs-authorization/69832>\
**Category:** Extras\
**Created:** [April 22, 2022, 6:23am UTC](https://forum.xojo.com/t/avfoundationmbs-authorization/69832 "2022-04-22T06:23:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrew\_Voller](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/9de053/32.png) [@Andrew\_Voller](https://forum.xojo.com/u/Andrew_Voller)\
**Post date:** [April 22, 2022, 6:23am UTC](https://forum.xojo.com/t/avfoundationmbs-authorization/69832/1 "2022-04-22T06:23:10Z")

</div>

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,

Andy

---

<div class="post-metadata">

**Author:** ![Christian\_Schmitz](https://forum.xojo.com/user_avatar/forum.xojo.com/christian_schmitz/32/158_2.png) [@Christian\_Schmitz](https://forum.xojo.com/u/Christian_Schmitz)\
**Post date:** [April 22, 2022, 7:00am UTC](https://forum.xojo.com/t/avfoundationmbs-authorization/69832/2 "2022-04-22T07:00:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Andrew\_Voller](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/9de053/32.png) [@Andrew\_Voller](https://forum.xojo.com/u/Andrew_Voller)\
**Post date:** [April 22, 2022, 7:56am UTC](https://forum.xojo.com/t/avfoundationmbs-authorization/69832/3 "2022-04-22T07:56:24Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Andrew\_Voller](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/9de053/32.png) [@Andrew\_Voller](https://forum.xojo.com/u/Andrew_Voller)\
**Post date:** [April 23, 2022, 5:24am UTC](https://forum.xojo.com/t/avfoundationmbs-authorization/69832/4 "2022-04-23T05:24:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Christian\_Schmitz](https://forum.xojo.com/user_avatar/forum.xojo.com/christian_schmitz/32/158_2.png) [@Christian\_Schmitz](https://forum.xojo.com/u/Christian_Schmitz)\
**Post date:** [April 23, 2022, 11:25am UTC](https://forum.xojo.com/t/avfoundationmbs-authorization/69832/5 "2022-04-23T11:25:47Z")

</div>

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