IOS multiple images

Is there a way to add in the chat more than one image from the IOS gallery in one selection only ?

For Android I'm using 

var customFileType = new FilePickerFileType(

new Dictionary<DevicePlatform, IEnumerable<string>>

{

            { DevicePlatform.iOS, new[] { "public.image" } }, // UTType values

            { DevicePlatform.Android, new[] { "image/jpeg", "image/png" } }, // MIME type

            { DevicePlatform.WinUI, new[] { ".jpeg", ".jpg" , ".png"} }, // file extension

                                                                         //{ DevicePlatform.Tizen, new[] { "*/*" } },

                                                                         //{ DevicePlatform.macOS, new[] { "cbr", "cbz" } }, // UTType values

});

myfoto = await FilePicker.Default.PickMultipleAsync(new PickOptions()

{

    PickerTitle = "Seleziona immagini",

    FileTypes = customFileType

});

and it's working perfectly 

But using the same in iOS I'm not able to open the Iphone photo gallery instead using the MediaPicker I can only select one image

Is there any solution or workaround ?



5 Replies

KK Kamala Kannan Sakthivel Syncfusion Team July 5, 2024 01:21 PM UTC

Hi Walter Martin,

We regret to let you know that we don't have workaround in our SfChat control for this scenario since its not supported in .NET MAUI framework itself.

 

Essentials - MediaPicker add method to select multiple images · Issue #6903 · dotnet/maui (github.com)

 

In above issue conversation, they suggested to use Xamarin Media gallery in Maui project to select multiple photos.

https://github.com/dotnet/maui/issues/6903#issuecomment-2037792365

 

Xamarin Media Gallery :

dimonovdd/Xamarin.MediaGallery: This plugin is designed to picking and save images and video files from native gallery of Android and iOS devices and capture photos (github.com)


Regards,
Kamala Kannan S




WM Walter Martin replied to Kamala Kannan Sakthivel December 6, 2024 09:38 AM UTC

I managed to use this library on Iphone to be able to select more than one image from the Iphone gallery

MPowerKit/MediaPlugin: Take & Pick Photos and Video Plugin for Xamarin and Windows

and then I added these images to a SfCarousel.

Everything is working perfectly as in my attachment

Since I need to send those images via email I have to find a way to clean the SfCarousel content after sending the images via email but the function below crashes the application (for index out of bound)  only on Iphone because on Android it works perfectly

vm.ImageCollection.Clear();

Is there any workaround or suggestion to clean the datasource of a SfCarousel ?



Attachment: Carousel_ac0c3169.zip


AA Aarthi Arjunan Syncfusion Team December 9, 2024 03:03 PM UTC

Hi Walter Martin,

 

Thank you for reaching out to us. We are able to reproduce the reported issue on our end. Currently, we are investigating the reported issue, and we will provide further details on or before December 11, 2024. We appreciate your understanding and patience in the meantime.

 

Regards,

Aarthi A.



AA Aarthi Arjunan Syncfusion Team December 10, 2024 12:05 PM UTC

Hi Walter Martin,
 

Thank you for your patience. We have resolved the reported issue, "Exception raised on iOS platform when clearing the ItemsSource collection of SfCarousel". This fix will be included in our upcoming weekly release on December 17, 2024. We will notify you once NuGet is released and appreciate your understanding and patience until that time.

 

Regards,

Aarthi A.



HC Hariharan Chokkalingam Syncfusion Team December 19, 2024 06:28 AM UTC

Hi Walter Martin,


We have included a fix for the reported issue, "Exception raised on iOS platform when clearing the ItemsSource collection of SfCarousel" in our latest weekly NuGet release, v28.1.35, which is now available for download (NuGet). We thank you for your support and appreciate your patience in waiting for this update. Please get in touch with us if you would require any further assistance.


Regards,

Hariharan


Loader.
Up arrow icon