AUv3 running "in-process" resolves different URLS to required directories depending on which Host is hosting the AU

This seems to be a sandboxing issue but the solution is not so obvious ... 

Our sandboxed Audio unit extension requires a permanent folder in which to store a database which can be used by all instances of the AU.

Where can we store the database in a directory so that the AU can find it regardless of which host app it's running in ?

The AU supports loading in-process.

The problem we have is that when the AU is running in-process in a sandboxed host app URLs to the usual directories ( ~documents, shared, app support etc ) all resolve to the sandbox container.  

But when the AU is hosted in a non-sandboxed host  ( ie. Logic Pro )  the URLs resolve to the actual user folder.  (~/users/***/documents etc  )

How can the AU automatically obtain a URL that will always resolve to the same place, will be permanent, wont be hidden from the user AND still remain “legal” for distributing in the App Store?  

…  

thanks!  

It would be nice to have this confirmed but it looks like our solution is to create an app group.

It seems we can read and write as we need to from the group container and the that directory is always available to the audio unit even when running in Logic. ( via containerURL forSecurityApplicationGroupIdentifier )

It would be nice if someone could confirm this is the right thing to do ! :)

So to reiterate our issue: We were using the File Manager to obtain a URL to a folder in user domain, lets say the Documents folder ...

  • When the AU is hosted in a sandboxed host FileManager supplies a URL to a folder inside the sandbox container. (as expected)

  • When the same AU is hosted in a non-sandboxed host FileManager supplies a URL to a folder inside the user folder (ie. ~/Documents)

That inconsistency is a problem.

Solved by creating an App Group and asking FileManager to supply the URL for the group folder.

?

AUv3 running "in-process" resolves different URLS to required directories depending on which Host is hosting the AU
 
 
Q