You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "hieunguyen2211 (via GitHub)" <gi...@apache.org> on 2023/12/20 11:23:14 UTC
[I] [IOS] All photos are available even though only some photos are allowed to access [cordova-plugin-camera]
hieunguyen2211 opened a new issue, #877:
URL: https://github.com/apache/cordova-plugin-camera/issues/877
# Bug Report
## Problem
In IOS, when accessing the gallery, there is a dialog and the user needs to choose an option to grant access gallery permission to the application. If the user chooses "Select more photos...", there is a view for him/her to select which photos can be accessed. However, after that, in the next view, where the user can select a photo to import to the application, the user can access all photos in the gallery instead of only selected photos in the previous view => Granting read access for some photos does not work.
### What is expected to happen?
When the user selects photos in the gallery to import to his/her application, only some photos, that are granted access, will be displayed.
### What does actually happen?
When the user selects photos in the gallery to import to his/her application, all photos are displayed regardless ungranted access permission
## Information
The [requestPhotoPermissions](https://github.com/apache/cordova-plugin-camera/blob/master/src/ios/CDVCamera.m#L487) method in **CDVCamera.m** is using deprecated API from **PHPhotoLibrary**: **authorizationStatus** and **requestAuthorization**. These 2 deprecated methods cannot return the correct value when the user chooses the "Select more photos..." option. 2 alternative methods for those are: **authorizationStatusForAccessLevel** and **requestAuthorizationForAccessLevel**, which can return the correct value: **PHAuthorizationStatusLimited** instead of **PHAuthorizationStatusAuthorized**.
### Environment, Platform, Device
Iphone 14 (IOS 16.6)
### Version information
- Cordova: 12.0.0
- Cordova-ios: 7.0.0
- Cordova-plugin-camera: 7.0.0
## Checklist
<!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
- [ ] I searched for existing GitHub issues
- [ ] I updated all Cordova tooling to most recent version
- [ ] I included all the necessary information above
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [I] [IOS] All photos are available even though only some photos are allowed to access [cordova-plugin-camera]
Posted by "hieunguyen2211 (via GitHub)" <gi...@apache.org>.
hieunguyen2211 commented on issue #877:
URL: https://github.com/apache/cordova-plugin-camera/issues/877#issuecomment-2022312169
Hi @jcesarmobile ,
Are there any update on this topic? From my perspective, if permissions are not required for the photo picker on IOS (without accessing privacy), the code should be changed to not to request permissions.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [I] [IOS] All photos are available even though only some photos are allowed to access [cordova-plugin-camera]
Posted by "jcesarmobile (via GitHub)" <gi...@apache.org>.
jcesarmobile commented on issue #877:
URL: https://github.com/apache/cordova-plugin-camera/issues/877#issuecomment-1871627878
There is no difference in knowing which option the user selected, the photo picker doesn't really need any permissions to work. Choosing the "limited" option, the only thing that limit is accessing privacy related information about the picture, such as the exif data, so that's why the picker shows all pictures, because no permission is required for accessing them.
But it's true that it's very confusing, not sure if the code should be changed to not request permissions or to add an option to request it or not.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [I] [IOS] All photos are available even though only some photos are allowed to access [cordova-plugin-camera]
Posted by "DuyTrinh94 (via GitHub)" <gi...@apache.org>.
DuyTrinh94 commented on issue #877:
URL: https://github.com/apache/cordova-plugin-camera/issues/877#issuecomment-1867508097
+1. I also meet this issue with my iOS device
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [I] [IOS] All photos are available even though only some photos are allowed to access [cordova-plugin-camera]
Posted by "NityaSantosh26 (via GitHub)" <gi...@apache.org>.
NityaSantosh26 commented on issue #877:
URL: https://github.com/apache/cordova-plugin-camera/issues/877#issuecomment-1865834554
+1. Same issue for me with iOS.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org