File::userApplicationDataDirectory points to different locations


#1

I just noticed that on OSX, the special location enumeration File::userApplicationDataDirectory normally points to:

/Users/<username>/Library

However, if I am running my plugin under GarageBand, it points to

/Users/<username>/Linrary/Containers/com.apple.garageband10/Data/Library

Is this correct? Why would this location be different just because I'm usign a different host application?

 


#2

It's because GarageBand is sandboxing your plugin, and preventing access to the rest of the filesystem.


#3

Thanks! I am fairly new to OSX development and just learning about application sandboxing.


#4

Use the "Audio Music Apps" Folder for your Plugin Settings

PropertiesFile(File("~/Music/Audio Music Apps/MyCompany/MyPlugin.settings"),options);

( btw. never! create this folder with root permissions from your installer) 


#5

I don't think that "Audio Music Apps" is one of the special folder enumerations in JUCE and I would like to avoid using conditional compiles. It would be nice to have that enumeration if that is the best place to put plugin settings.  Also, I noticed that most applications are putting their files in "/Library/Application Support/My Company", not "/Library/My Company".