miguelpruivo/flutter_file_picker

File Picker Ignores iOS Photo Access Limitations

Opened this issue · 10 comments

I've encountered an issue with the file_picker package on iOS, where it does not adhere to the photo access limitations set by the user in the iOS 14+ privacy settings.

Environment

  • Flutter version:
[✓] Flutter (Channel stable, 3.16.8, on macOS 14.2.1 23C71 darwin-arm64, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
[✓] Android Studio (version 2023.1)
[✓] IntelliJ IDEA Community Edition (version 2023.2.2)
[✓] VS Code (version 1.85.2)
  • file_picker version: ^6.1.1
  • Testing Device/Simulator: iOS (version: 17.2)

Expected Behavior
When a user limits the number of photos an app can access (a feature introduced in iOS 14), the file picker should only display and allow selection from those photos.

Actual Behavior
Despite the user setting limitations on the number of accessible photos through iOS privacy settings, the file picker displays and allows selection from the entire photo library.

I'm not sure if this behavior is a bug or a misunderstanding on my part of the file_picker capabilities. Any clarification or guidance would be greatly appreciated.

Steps to Reproduce

  1. On an iOS 14+ device, limit the photo access for the app through the privacy settings.
  2. Use the file_picker to try and select a photo.
  3. Observe that the file picker does not respect the set limitations and displays the entire gallery.

Screen Record

Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-01-26.mp4

This issue is stale because it has been open for 14 days with no activity.

I have the same problem.

Hi, any updates on this issue?

This issue is stale because it has been open for 14 days with no activity.

This issue was closed because it has been inactive for 14 days since being marked as stale.

Hi, i have the same problem in the 8.0.0+1 version, is there any updates on it?

Hi, We are facing the same problem. Any update on this @navaronbracke

I have not yet had time to look into this.

I believe this behavior also happens after Android 11 or so? I am not sure.

I am not sure that this is incorrect. It appears that the window that is open is the native photo selector, where you select which images you want to give the app access to (i.e basically re-doing what you did in the first window). These images are later then sent to the app, so that it only can ever read the images you are allowing it to read.