Ask for camera access in PyInstaller bundled app

Viewed 107

I spent some time bundling my OpenCV + Python app by using PyInstaller on MacOS Big Sur. The first time I run it resulted in an immediate crash, which I tracked down to be camera's fault, so I fixed it by adding the following section to the app Info.plist:

<key>NSCameraUsageDescription</key>
<string>Camera open request</string>

Now, the app opens correctly and displays the windows and buttons I created using PyQt, but the camera stream reserved panel remains empty.

Is there a way to force the app to ask for camera permissions? Since the app doesn't even ask, I am not able to grant these permissions, not even by going into MacOS privacy settings.

I would also like to point out that the app works perfectly when run directly from Terminal, since in this way the permissions are requested by the Terminal app, to which I already granted them.

0 Answers
Related