Reputation: 35
A related question asks how to write to the Downloads folder in a sandboxed app.
I have code that does that and works at my end. However, upon submitting my app to the App Store, Apple told me I'm only allowed to write to /Downloads/[App-Identifier]
, not to /Downloads
.
What's the app identifier? Is it the bundle identifier? And where's the documentation pertaining to this? I've looked in the App Store Review Guidelines (Apple referred to 2.4.5(i)), in the Sandbox guide, used Google, ... no luck so far.
Upvotes: 0
Views: 1132
Reputation: 53000
The App-Identifier
will be the Bundle ID. As to where this restriction to write to a subfolder of ~/Downloads
comes from I've no idea (it does not appear to be in the Review Guidelines, the App Sandbox Guide, etc. as you found out). You could query the review, but going another way might be easier...
You will probably be better off using a bookmark, see Security-Scoped Bookmarks and Persistent Resource Access, and an entitlement as your linked question suggests. This will also allow you to directly store into ~/Downloads
without question - if the user selects it (put up a standard file dialog styled as a permission request, only allow folders, and preset to show the home directory; you can if you wish restrict selection to only Downloads).
HTH
Upvotes: 1