Essentials
Essentials copied to clipboard
Cannot select images stored in Photos app in FilePicker IOS
Description
I am using the FilePicker for IOS however when the window opens there is no images or videos available to be selected. When I move the photos from Photos app to Files app, they are available to be used correctly.
Steps to Reproduce
- Use PickMultipleAsync to open FilePicker
- No images or videos available that are stored in Photos app.
Expected Behavior
Images and videos are available to be selected by the file picker by default.
Actual Behavior
Only images and videos physically moved by the user to the Files app can be used.
Basic Information
Images and videos should be available to FilePicker whether stored in Photos or files app.
- Version with issue: Xamarin.Essentials 1.6.0-pre4
- IDE: VS 2019
- Platform Target Frameworks:
- iOS: 14.0
Screenshots
With only media in Photos app (not in Files app)

After moving image manually from Photos to Files app

Does this work when using the MediaPicker?
Yes MediaPicker works as expected, however, I dont think you can pick both photos and videos simultaneously on the MediaPicker? This is why I am looking at using FilePicker
I think this is the intended behaviour. When you want a picture from the Photo Library, you use the ImagePicker. If you want to add a file from the file storage, you do a FilePicker request.
If you open the Files app directly on your phone, it also doesn't have access to the images in the Photos app as far as I can see.
This is also comparable with how Mail works. There are two different attachment options, one that says Insert Photo or Video that opens the Photo Library and one that says Add Document which opens the Files app in an overlay. In my case, the Files app then isn't able to see the images in the Photo Library.
If this is intended behaviour then that's fair enough. Although the FilePickerFileType presets currently available (Image and Video) tend to be a bit redundant in that case? On Android the FilePicker allows me to select multiple photos and videos at the same time which is wonderful.
@Sinkanakagug, if I understand your request correctly, I think that is already possible (only verified on iOS14 for now).
If you call await FilePicker.PickMultipleAsync() and then when the overlay opens, you select the 3 dots at the top and choose Select you will be able to select multiple files from different file types (just selected images, video and PDF all simultaneously in). After you selected them, you click Open to return the results.
@BjornVanslembrouck Yes that is the functionality I am expecting, as far as I am aware though you cannot select any images or videos that are stored in the Photos app by doing this, they have to be moved over manually first? This might be difficult or confusing for an end user
@Sinkanakagug, unfortunately that is a limitation on the OS itself. Apple doesn't allow you to see the photos in the Photos app via the Files app.
If that is an issue with iOS, then it should be mentioned on the documentation page.
https://docs.microsoft.com/en-us/xamarin/essentials/file-picker?tabs=ios
It would also be nice if MediaPicker had an option to pick multiple photos then.
This is not a problem. You must use the MediaPicker to access photos on iOS. This is a native behavior
Given that the example code in the documentation demonstrates how to choose photos, it should be made clear that it's not possible to choose images from the Photos app, but rather only ones that have been downloaded or otherwise added to the phone without being taken with the camera.
On Thu, Jul 1, 2021, 6:38 AM Dima Dimov @.***> wrote:
This is not a problem. You must use the MediaPicker to access photos on iOS. This is a native behavior
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/xamarin/Essentials/issues/1539#issuecomment-872171653, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADAPQVJUZGLDXD6B5ZCDYLTVRHUJANCNFSM4T4XSKYA .
bit late - implement both the plugins, asked user via dialog "pick from files" or "Pick from photos".
That behavior seems contrary to what I see in Android and UWP. In Android the Xamarin Essentials FilePicker has access to any photo that I can think of (at least in my simple test). In UWP I can navigate all over everywhere to select photos. Why is this so different in iOS? The main way that my clients get photos on their device is via the camera. FilePicker gives me exactly zero photos on iOS. Why is Xamarin Forms all about only (mainly) writing it once and using it on all these platforms? And so not about that in this case?
Thanks for letting me rant. XF has not been friendly to me today.
I have the same issue, but MediaPicker is only for photos OR video (one method for each case), I need to use an unified option, it would possible?