Great question OP! I noticed the same info in Platforms SOTU and was looking for a session last night as well.
I would love to see a well documented API that allows for clear and straightforward way to grant permissions to enable apps read/write to specific folders.
It is not really clear if one wants to develop a file-management utility how to go about it unless the app is not sandboxed. And in that case can it even get app store approval? What would be the process?
The straightforward ways to access files in a sandboxed approach are basically unworkable for any practical utility apps. The sandbox folder is nested deep under $HOME/Library, and $HOME/Documents/ is not sufficient. e.g. One might want to access an SSD.
I would love to see a way to carve out a writeable space on the Mac volume, or on an external volume as $EXTVOLUME or $HOME/ with read access to non-system folders and pretty much any media under $HOME. Or provide us a clear path to certifying non-sandboxed apps.
Post
Replies
Boosts
Views
Activity
Thanks for the reply, and advice about open panel and security scoped bookmark. I am keen to try it out and see if those suggestions work.
What are you trying to do and how is the sandbox interfering with it?
I want to either organize in place (move and rename) files and folders under a particular directory tree. Probably a sub-folder or the users home. ~/somedir/ with access to all of the subdir items without needing to add those individually. Or scan ~/somedir/ and import to another folder tree ~/outputdir. It could be an external volume ssd.
Sandbox by default wouldn't allow that using nsfilemanager iterators after the SwiftUI folder selection dialogue.
With sandbox enabled I have to copy everything under "Downloads" and run the code. Not ideal, so I set entitlements to not sandboxed and put in lots of checks for system folders etc to lock it down.
Hoping to come up with a flexible solution that can be released to the app store.