Question regarding Sandbox safe and Properties File

As I understand, to run your plugin in certain mac applications, your plugin must set as “sandbox safe” in the projucer, which means your plugin does not access any files outside a very specific area. The only file that my plugin access is a PropertiesFile in the default OSX location …/Application Support/CompanyName .

Is my plugin sandbox safe? If not, where should I store my PropertiesFile? Is my understanding of sandbox safe incorrect? lol. Any help appreciated.

1 Like

What you require in the sandbox depends on what your plugin does. In general the sandbox is a protected environment unique to your plugin and if you want to go outside of this you need special permissions from the OS, the user and sometimes Apple. That said, if you plugin is just processing inputs and sending out outputs then you’re not using any resources, such as a camera or a file system, so you should be alright. One caveat - the OSX location …/Application Support … is outside the sandbox. If I remember correctly you should be automatically redirected to the sandboxed version of this directory.

Having said this, in a plugin it’s better to use the provided AudioProcessor::setStateInformation and AudioProcessor::getStateInformation methods to store properties.

IIRC a few years ago Apple recommended ~/Music/Audio Music Apps/CompanyName/ for storing properties files for plug-ins that might be sandboxed. If you need to store properties for multiple users - e.g. for unlocking your plug-in for all users - you can use /Users/Shared/Music/Audio Music Apps/CompanyName/. In my experience this works great.

1 Like