UnityNativeFilePicker
UnityNativeFilePicker copied to clipboard
iOS media picker not showing any images to pick from
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
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);
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.
I have the same problem. It was working in an older version.
This is the current 1.3.3 version on ios
This is the old version on ios. I don't know the exact version.
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).
@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.