forced by the rules of the Mac App Store, I enabled the use of the sandbox in my application.
I am having problems with the recent files menu, which works correctly only when you try to reopen a file that was already opened with a standard “Open” command in the current session.
Access to the file fails, however, if you try to reopen a file opened in a previous session.
After reading and re-reading the documentation on the sandbox, everything that I found about this is:
Now, while dragging a file works, the recent files menu does not.
In short, it seems that the access authorization does not persist from one session to another. Now, since this is patently absurd, and that SimpleText does it normally, I wonder what’s wrong.
Well, I also found this:
[code]If you are managing documents using any technology other than the NSDocument class, you should convert to using this class to benefit from its built-in App Sandbox support. The NSDocument class automatically works with Powerbox. NSDocument also provides support for keeping documents within your sandbox if the user moves them using the Finder.
Remember that the inheritance path of the NSOpenPanel and NSSavePanel classes is different when your app is sandboxed. See “Open and Save Dialog Behavior with App Sandbox.”
If you don’t use the NSDocument class to manage your app’s documents, you can craft your own file-system support for App Sandbox by using the NSFileCoordinator class and the NSFilePresenter protocol.[/code]
See this thread http://www.rawmaterialsoftware.com/viewtopic.php?f=4&t=9149, for how to get “Open Recent” working in your Sandboxed apps with Juce!
Thank you very much, Pete!
I also see that Jules is working on it, great!