tl;dr: If your application automatically saves user data and files to anywhere other than the visible folders in the users area; your application can be rejected.
There are only a handful of folders that we can utilize to create these kind of applications, “Photos”, “Movies”, “Downloads” & “iCloud/Mobile Documents”. For Cardsmith (a greetings card application), none of these are applicable.
There is a temporary entitlement which should allow this function; however it’s usage is for older applications migrating to the App Store, and therefore most likely you’ll be rejected for it.
So what’s the solution?
At this juncture, I don’t know the perfect solution. I have devised a solution for one of my apps that creates a subfolder within the “Photos” folder, I don’t think it’s the correct place, but out of the four listed above, it seems the most appropriate. I have also filed a feature request at Apple for a new entitlement that would solve this problem by granting us access to a specific subfolder within the user area, a subfolder that’s only for our applications, so we don’t have complete unrestricted access.
A terrible solution:
Is to let the user choose the folder, store this in a Security-Scoped Bodgemark. Then when a user browses this folder, you gain access, read everything and close access. There are several issues with a SSB,
- You have 90 seconds before it expires, when it expires, you lose access to that folder until the application is restarted. Repeated expirations can crash the computer.
- If you need to read or write anything to that folder, even reading something like the file size, requires access and all reading/writing to be completed within that 90 second window.
- Apple’s own imaging API’s are not 100% compatible.
- They break easily; leaving your application unable to access that folder and forcing the user to reconnect to it, when they break, you can’t even get a file path or file name from it, so you can’t even guide the user to where the folder is (unless you store ancillary meta data yourself).
Remember these are only the issues that I’ve personally experienced with SSBs.
I will let you know if Apple accept my compromise solution of storing the data in the “Photos” folder.
If you are designing a Shoebox style application and intend to sell in the Mac App Store, please consider an alternative application model. If something doesn’t change at Apple and someone else doesn’t come up with a better solution than above, then the prospects for Shoebox applications is pretty bleak on the Mac App Store (Ironically nearly every single iOS application could be considered a Shoebox application).
I hope that this makes sense. In all irony it was the Mac App Store that forced us to move our data to the Application Container in the first place.