Skip to content

iOS media picker not showing any images to pick from #46

Open

Description

@mcolombo

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);

Activity

  1. yasirkula commented on Oct 17, 2023

    @yasirkula
    Owner

    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.

  2. linusschmid commented on Dec 13, 2023

    @linusschmid

    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

  3. yasirkula commented on Dec 13, 2023

    @yasirkula
    Owner

    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).

  4. yasirkula commented on Dec 16, 2023

    @yasirkula
    Owner

    @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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions