Skip to content

Commit

Permalink
Merge pull request #2384 from JaxkDev/patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
freakboy3742 authored Feb 10, 2024
2 parents 283e763 + ac76ff3 commit 5d11412
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions changes/2381.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A crash observed on iOS devices when taking photographs has been resolved.
1 change: 1 addition & 0 deletions changes/2381.docs.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The camera permission requirements on macOS apps were clarified.
3 changes: 2 additions & 1 deletion docs/reference/api/hardware/camera.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ Notes
The permissions required are platform specific:

* iOS: ``NSCameraUsageDescription`` must be defined in the app's ``Info.plist`` file.
* macOS: The ``com.apple.security.device.camera`` entitlement must be enabled.
* macOS: The ``com.apple.security.device.camera`` entitlement must be enabled, and
``NSCameraUsageDescription`` must be defined in the app's ``Info.plist`` file.
* Android: The ``android.permission.CAMERA`` permission must be declared.

* The iOS simulator implements the iOS Camera APIs, but is not able to take photographs.
Expand Down
3 changes: 2 additions & 1 deletion iOS/src/toga_iOS/hardware/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ def __init__(self, interface):
):
self.native = iOS.UIImagePickerController.new()
self.native.sourceType = UIImagePickerControllerSourceTypeCamera
self.native.delegate = TogaImagePickerDelegate.new()
self.delegate_link = TogaImagePickerDelegate.new()
self.native.delegate = self.delegate_link
else:
self.native = None
else: # pragma: no cover
Expand Down

0 comments on commit 5d11412

Please sign in to comment.