UnityNativeFilePicker icon indicating copy to clipboard operation
UnityNativeFilePicker copied to clipboard

iOS media picker not showing any images to pick from

Open mcolombo opened this issue 1 year ago • 4 comments

Hi! This is an iOS related issue. Android works fine.

Upon clicking to pick an image, the user is prompted to select an image but no images are presented.

I'm calling : NativeFilePicker.PickFile(callback, "public.image"). I did a manual setup for iOS (including the iCloud entitlements).

I'm also getting a Permission.Granted result upon requesting permission. iOS "Select Photos" popup permission is never shown.

Tested on real device iOS version: 15.5. Unity version: 2020.3.41f1

Am I missing something here?

Thanks in advance! Cheers, Mariano

unnamed

Here's my code:

#if UNITY_ANDROID // Use MIMEs on Android string[] fileTypes = new string[] { "image/*"}; #else // Use UTIs on iOS string[] fileTypes = new string[] { "public.image" }; #endif NativeFilePicker.Permission permission = NativeFilePicker.PickFile((path) => { if (path != null) { //do work } }, fileTypes);

mcolombo avatar Oct 17 '23 17:10 mcolombo

To my knowledge, Photos app isn't listed in the native file picker dialog of iOS. For media save/load tasks, consider using NativeGallery instead.

yasirkula avatar Oct 17 '23 21:10 yasirkula

I have the same problem. It was working in an older version. This is the current 1.3.3 version on ios image0 This is the old version on ios. I don't know the exact version. image1

linusschmid avatar Dec 13 '23 13:12 linusschmid

I'm surprised to see Photos there in the first place. It wasn't there on a years-old iOS test device that I had used to test the plugin. For gallery interactions, would you consider using NativeGallery instead? PS. But I'll still do a quick google search when I get the chance (busy schedule right now).

yasirkula avatar Dec 13 '23 17:12 yasirkula

@linusschmid I couldn't find related topic on the internet in my research. Maybe the bottom screenshot comes from NativeGallery instead of NativeFilePicker? The native iOS code was last changed 3 years ago so I find in unlikely that upgrading NativeFilePicker could cause this issue. You may have also updated the test device's iOS version and the new iOS version may have a bug.

yasirkula avatar Dec 16 '23 18:12 yasirkula