permission.camera is missing from app's pyproject.toml file, and
self.camera.request_permission() is called from within a toga.App instance, and
the app is run using briefcase run [-ur]
Then it crashes and produces no logs.
If you dig around in the 'Report' dialog generated by macOS, you get the following message:
This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSCameraUsageDescription key with a string value explaining to the user how the app uses this data
Steps to reproduce
Instantiate a briefcase app
Add a call to self.camera.request_permission() in a method
Add the method as a callback to a button
briefcase run -ur and push the button
If you run briefcase dev the app seems to work and does not warn that the permissions have not been set.
Expected behavior
A warning during development, and an error when running a bundled app, that the permission.camera metadata is missing from the pyproject.toml file
I think this issue only occurs on Sonoma; I did the initial development on Ventura, and didn't have this problem, but I have since updated my laptop and can confirm that it's definitely happening now.
Describe the bug
If :
permission.camera
is missing from app'spyproject.toml
file, andself.camera.request_permission()
is called from within atoga.App
instance, andbriefcase run [-ur]
Then it crashes and produces no logs.
If you dig around in the 'Report' dialog generated by macOS, you get the following message:
Steps to reproduce
self.camera.request_permission()
in a methodbriefcase run -ur
and push the buttonIf you run
briefcase dev
the app seems to work and does not warn that the permissions have not been set.Expected behavior
A warning during development, and an error when running a bundled app, that the
permission.camera
metadata is missing from thepyproject.toml
fileScreenshots
No response
Environment
Logs
briefcase.2024_05_22-05_55_05.run.log
Additional context
No response