I can’t figure out how file access on iOS works. When i access the document folder i’m getting following path by JUCE:
/var/mobile/Containers/Data/PluginKitPlugin/15769554-7F73-4847-ADB8-F94F51302981/Documents/PLUGIN_NAME/presets/FMR Presets Bank/Arp/ARP Bass Arpeggio FMR.pjunoxl
All works with this path. I can write and read files and my internal preset browser works also in GarageBand.
loadFileAsString returns the text contained in the file.
When i pass exactly the same document folder and open the native FileChooser in GarageBand (it works in the standalone version). The file chooser returns a slightly different path after selecting the same file:
/private/var/mobile/Containers/Data/Application/C40884E9-EDF5-4F01-99C0-EBDB0325FD77/Documents/PLUGIN_NAME/presets/FMR Presets Bank/Arp/ARP Bass Arpeggio FMR.pjunoxl
loadFileAsString always returns an empty string in this case for that path, but
existsAsFile returns true. The file is 1Kb, so i don’t think it’s empty. I can imagine that it has something to do with sandboxing.
Would be great if someone can give me some information how this works. What happens here?
My new question is, how can i manage presets iOS? I want to use the same folder for the standalone and the Auv3 from inside garage band.
Any input welcome.