Is there any benefit from having a AU2 plugin running sandboxed

Im curious if anyone is turning on sandboxing for AU2 plugins?

Im wondering if there is any benefit in doing this other than constraining what your plugin can access etc

It also makes file selection and logging a bit more fiddly compared to unsandboxed mode when it comes to the location of directories. Is it worth it?

Apple did a demo where they crashed a sandboxed plugin, but the DAW continued to function without crashing (and losing your work).
So that is a very handy feature.

Yeah that part is good :slight_smile:

The thing thats a little tricky is if you are distributing both Windows and Apple versions in both VST and AU and the way the file system is virtualised for the sandbox.

Say you are using this for the location of a log:

File::getSpecialLocation(juce::File::userApplicationDataDirectory)
                            .getChildFile(juce::String("Logs/" + company_name)

For non sandboxed and vst it would be:

~/Library/Logs/<company_name>

for sandboxed it would be:

~/Library/Containers/<com.companyname>/Data/Library/Logs/<company_name>

Then on Windows VST3 it would be:

C:\Users\<MYUSER>\AppData\Roaming\Logs\<company_name>

So as you can see it’s very messy if you use the same special directory structure both both platforms and plugin types. There might be some sandbox setting that allows the use of ~/Library/Logs/<company_name> but I’ve not found one…