Trouble with FileChooser on iOS

Hello,

for days now I am trying to get the FileChooser working in my iOS app.
I am already able to save a file either on my iPad or in my iCloud via FileChooser. That’s working fine so far.
But I can’t get it to work when I want to load this file. Neither from iPad disk nor from iCloud. Here we have the first strange issue:
When I store the file on my iCloud it appears greyed in the FileChooser for loading it. I can even not pick it. Yet, I can access the fiel via my Mac.
When I store it directly on my iPad it is not greyed and I can pick it.

Second issue:
When I pick the file stored on my iPad FileChooser closes but nothing happens.
I have copied the code from the DialogsDemo.h:

fc.reset (new FileChooser ("Choose a file to open...",    File::getCurrentWorkingDirectory(),
                                           "*", useNativeVersion));

            fc->launchAsync (FileBrowserComponent::canSelectMultipleItems | FileBrowserComponent::openMode
                                 | FileBrowserComponent::canSelectFiles,
                             [] (const FileChooser& chooser)
                             {
                                 String chosen;
                                 auto results = chooser.getURLResults();

                                 for (auto result : results)
                                     chosen << (result.isLocalFile() ? result.getLocalFile().getFullPathName()
                                                                     : result.toString (false)) << "\n";

                                 AlertWindow::showMessageBoxAsync (AlertWindow::InfoIcon,
                                                                   "File Chooser...",
                                                                   "You picked: " + chosen);
                             });

According to this code there should come up a MessageBoy but it does not.
I am pretty sure, that I am doing something wrong, but cannot find it.
I enabled iCloud permission and Support Document Browser in Projucer. Am working with JUCE v5.4.1.

Please help!

Raphael

Same problem! Hope for an update.

I have just encountered this. (JUCE 7 with and iOS simulator) Using a JUCE non native dialog on open seems to work

This seems to be a filepattern problem. When I use an empty string instead of *.rep I can select the files.
In class FileChooser::Native the following line gives v. different results.
auto utTypeArray = createNSArrayFromStringArray (getUTTypesForWildcards (owner.filters, firstFileExtension));

When the wildcard is the empty string this results in a single element containing “public.data”.
When the wildcard is “*.rep” the element contains “dyn.age81e3pu”

No idea if that’s useful

Turns out that if you need to use the Native File Browser on iOS to load a file with an extension you need to register that extension using a custom plist or just use the empty string wildcard