question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[imagepicker]: iOS14.0+ photoLibrary shows all photos even if user choose the selected photos permission

See original GitHub issue

🐛 Bug Report

I am using the expo-image-picker in my project. When I use the photo from the photo library, app shows the all photos even if I choose the “selected photos” permission. This is happening on the iOS 14.0+ only.

Environment - output of expo diagnostics & the platform(s) you’re targeting

expo-image-picker: 0.8.0

Steps to Reproduce

  1. Choose the “selected photos” permission in the photolibrary permission popup.
  2. Open photoLibrary
  3. It shows all photos

Expected Behavior vs Actual Behavior

This should display the selected photos only since I chose the “selected photos” permission.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
lukmccallcommented, Feb 5, 2021

Hi @thisisgit, this feature was added to expo-media-library in the SDK 40. See https://docs.expo.io/versions/latest/sdk/media-library/#medialibrarypresentpermissionspickerasync 😉

1reaction
thisisgitcommented, Feb 3, 2021

I had the same concern but after looking into a number of post, I have a feeling that it’s an intended behavior. (FYI, I’m new to mobile dev)

As I tested few apps like Instagram, Facebook, Pinterest, and etc., they all have their own custom camera roll and that’s the place where the app is showing all accessible photos. The image picker itself always shows all the photos and is only used to add selected photos to the camera roll.

Based on this thread, another thread, and this answer, I assume it is currently impossible to limit restricted photos in the image picker and to show only selected photos, creating custom camera roll is necessary.

So the UX goes like this:

  1. Full access to photos - shows all photos to your camera roll
  2. Access to only selected photos - select photos from the picker to display in your camera roll. Optionally have a button which lead user to select more photos.
  3. No access - show nothing in the camera roll. Optionally have a button that lead user to change app permission.

And to achieve above flow, we are missing following features:

  1. Being able to select more photos (sample screenshot) + open picker with previously selected photos
  2. Being able to fetch photos with permission to show in custom camera roll (open issue in another library)

Anyone please correct me if I’m wrong. cc @byCedric

Read more comments on GitHub >

github_iconTop Results From Across the Web

UIImagePickerController shows all … | Apple Developer Forums
The picker will still show the entire Photos Library and all photos and videos can be selected by the user. No matter what...
Read more >
expo-image-picker: app shows all photos even if I choose the ...
I am using the expo-image-picker for photo management. When I choose the "selected photos" permission and open the photo library, photo ...
Read more >
How to use the limited photos picker in iOS 14 for added privacy
This dialog lets you choose a limited subset of your library for the app to pick from (the Select Photos option), or use...
Read more >
Photo library changes in iOS 14 - MacKuba
The picker runs in a separate process, it handles the selection for you and sends you back only what the user selected, so...
Read more >
How to Manage Photo Library Permission in iOS - Swift Senpai
Whereas, when tapping on the “Manage” button, the user can either select more photos or grant full photo library access to the app....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found