Single Image picker in Flutter on iOS without permission
Solution 1
From Apple documentation:
PHPickerViewController is a new picker that replaces UIImagePickerController. Its user interface matches that of the Photos app, supports search and multiple selection of photos and videos, and provides fluid zooming of content. Because the system manages its life cycle in a separate process, it’s private by default. The user doesn’t need to explicitly authorize your app to select photos, which results in a simpler and more streamlined user experience.
This library uses PHPickerViewController
as seen here
Solution 2
The old UIImagePickerController
allowed it on older iOS'es, but it has been deprecated, since iOS 14.
The Flutter ImagePicker
plugin uses the PHPicker in the iOS code, as I checked for their code on Github, and it allows you to pick an image from the user without requesting permissions. I recommend highly to use that plugin.
Marcin Szałek
Well, I write a bit of code from time to time. On occasion, it happens to compile.
Updated on December 29, 2022Comments
-
Marcin Szałek over 1 year
According to those SO questions: UIImagePickerController not asking for permission and No permission to pick a photo from the photo library
If you want to select one image on iOS, you don't have to ask for permission to do it as the app doesn't actually access the gallery.
However, I can't find a way of doing it Flutter. Packages like ImagePicker always ask for permission.Has anyone succeeded in picking an image in Flutter on iOS without asking for permission?