Open IngweLand opened 3 years ago
Just checked the source code, and it looks like that exception is not relevant to this specific bug. It's related to another issue that group (album) thumb cannot be generated.
This is due to the new photo library permissions introduced in iOS 14
https://github.com/jamesmontemagno/MediaPlugin/issues/890
This can be resolved by either requesting that the user grant full library access when prompted. Or by using a different picker controller for iOS (the ELC one is based on code that's about 10 years old now).
I've written an implementation to use the iOS 14 PHPicker controller in my own fork here if you want to try it out
https://github.com/matthewkapteyn/MediaPlugin
That all being said - @jamesmontemagno is soon to archive this repository and is recommending to switch to the microsoft developped Xamarin Essentials library. I have a few apps that use MediaPlugin in production so i'll be continuing to support this plugin in my own fork for a good while longer. Or at least until Xamarin Essentials adds multi-picking.
Also, wouldn't be fair not to shout out this fork by @bpater-tp
https://github.com/bpater-tp/MediaPlugin
Who did a great job implementing GMImagePicker to replace ELC. This picker controller also supports iOS 14.
Media picker is Essentials does not support picking multiple files. And yes, choosing All photos permission is a workaround indeed. I will check those 2 forks, thanks!
@IngweLand FilePicker is essentials support picking multiple files https://docs.microsoft.com/es-es/xamarin/essentials/file-picker?context=xamarin%2Fandroid&tabs=android
Bug Information
Version Number of Plugin: 5.0.1 Device Tested On: iPhone 8 Simulator Tested On: Version of VS: 16.8.2 Version of Xamarin: 5.0-pre4 Versions of other things you are using: iOS 14.1
Steps to reproduce the Behavior
1. var files = await CrossMedia.Current.PickPhotosAsync(new PickMediaOptions { PhotoSize = PhotoSize.Full, SaveMetaData = false, }, new MultiPickerOptions());
Expected Behavior
Actual Behavior
Code snippet
Screenshots