I've been struggling to get the root path of local storage provider. E.g. /private/var/mobile/Containers/Shared/AppGroup/0C7A3DB2-BA52-4B54-XXXX-E95027E673A9/File Provider Storage
.
Users can grant access to folders for our drum sampler app in order to use audio samples without importing them and because we have facilities to quickly explore samples.
There are two reasons why i want to use this:
- To display "On My iPad"/"On My iPhone" when users explore the file
- Preferably in project files we would like to store paths to files in a way that projects still open correctly after re-installation of a user's device.
After poking around it seems that File Provider Storage is basically just an app-group named group.com.apple.FileProvider.LocalStorage
however we don't have permissions to join that group.
In both examples i think it'd be very confusing for users to see "File Provider Storage" instead of "On My iPhone"
So, at a high level, you’ve got a URL from the document picker and you’re looking for a way to get the user-visible name of that URL’s ‘container’?
I’m not sure if there’s a good way to do that. If no one else chimes in, I encourage you to open a DTS tech support incident and one of my colleagues can research this in more depth.
unfortunately the document file type is cross-platform and doesn't easily lend itself to these kind of extensions
Yeah, you’re not the first person to hit this problem, although I more often seen it with folks working on Mac apps.
One option here is to store the bookmarks separately from the document. This allows your app to work with a document locally on a single device. However, the user experience is less than ideal if they move the document to a new device.
Also since we use access granted to whole directories
To be clear, security-scope bookmarks are not limited to files; if you have access to a directory, you can create one for that directory.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"