UIImagePickerController shows all photos even if I choose "Select Photos.." option

In iOS 14 beta when I tries to access photos library, it asks for the permission first time and if select "Select Photos.." and select few photos to show next time if I tries to access photos, it shows me all the photos. ideally it should show me the photos which I have selected for my app.

Replies

UIImagePickerController runs out-of-process since iOS 11. There is no need to prompt for Photos Library access before showing the picker on iOS 11 and above, unless you really need to work with the selected PHAssets.

As outlined in this years session, there are some considerations for using the picker with Limited Library:

The picker will still show the entire Photos Library and all photos and videos can be selected by the user. No matter what the users selects in the picker, the PHAssets you can access will not change.

There is no support to only show assets in the picker that you app has access to when in Limited Library mode.
Please feel free to provide feedback and outline the use case where your app would need to further restrict the selection.
Thank you for your support!

Is that mean, we do not need to ask permission to access photos library and I can use photos/videos in my app without taking user permission?

If I go with this approach, will this create any problem when I will submit my app for review process before it is live on AppStore? Is there any chance my app will get rejected as I am accessing photos library without user permission?
When running on iOS 11 or above, your app don't need to ask for Photos Library permission before presenting UIImagePickerController (and assuming the app doesn't use PhotoKit/doesn't access UIImagePickerControllerPHAsset from the result).
Forcing users to give your app full Photos Library access before presenting UIImagePickerController could be considered an anti-pattern.
  • I have a question here about user privacy. Let's take a look at the customer perspective and their privacy with regards to photo sharing with an app using UIImagePickerController.

    If an app uses UIImagePickerController, then my understanding is the app will no longer show up in the Settings --> Privacy --> Photos menu (with options of [None] / [Selected Photos] / [All Photos]) as you don't need to ask for Photo Library permissions. Is that correct?

    Now, if that user goes to this app and chooses to select a photo, then their whole library will show. Is the takeaway that the app has access to all of the photos in the library? Or is the takeaway that this is only just a view of the images only and only the photo selected from the menu will be accessible to the app?

Add a Comment