I'm experimenting with full-disk access to my app and can't make it working. Here is list of steps I did:
Sandbox is turned ON. In fact the entitlements file looks like:
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
- I created archive of the app and tried to distribute it using boths Developer ID or Development methods
- I placed the binary of my app to /Applications folder
- I went to System Preferences -> Security & Privacy -> Privacy -> Full Disk Access and added access to my app in /Applications folder
- Of course I'm NOT attached to the app with Xcode
I'm testing it in Xcode 11 and on Catalina. It's dummy app, opening
NSOpenPanel
to let user select archives to decompress and tries to decompress it in the same directory using
libarchive framework.
Any hints? Am I doing anything wrong?
Thanks for the explanation.
The App Sandbox does support the concept of related files — see the Related Items section of the App Sandbox Design Guide — but this probably won’t help in this case. Most compression utilities want to be able to:
Accept a directory and create an archive next to that directory
Accept an archive and create a directory next to that archive
In both the cases the directory doesn’t have an extension, which prevents you from using the related files mechanism because that’s keyed off extensions.
There’s three ways around this:
Drop, or radically loosen, the App Sandbox
Present the user with a save panel for the output
Output to a directory chosen by the user up from
None of these are ideal, with the first one only being feasible if you’re distributing outside of the Mac App Store.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"