Trouble with FileChooser on iOS


#1

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