Lion permission problems
Lion permission problems
- Subject: Lion permission problems
- From: Matthew Weinstein <email@hidden>
- Date: Sat, 23 Jun 2012 09:17:19 -0700
Dear cocoa-dev,
So I'm wondering how in the maze of sandboxed apps how to get my app to work properly. What it does is wrap around pdf files so that they can be combined, separated; etc. It doesn't actually change the original pdfs, just remembers their locations, reads them in and then writes to a different pdf (as the user requests).
In addition it opens a specific wrapper on launch which contains standard elements that a user might want to add to their pdf (blank pages, etc.). The file is just a typical file that the program creates, stored at a location provided by the user, so that they can add their own elements to this wrapper.
The first time the program is run, it doesn't find this special wrapper, asks the user where they want it it, they pick a spot (home or documents), the program creates a directory, copies the needed files out of its bundle, it opens the file, and all is well, the elements from the "fixings" wrapper appear in a menu on the menu bar.
However, the second time the program is run, i.e., once the files have been put in place and I try to access them, I get a "257" error on [[NSDocumentController sharedDocumentController] openDocumentWithContentsOfURL: myurl display: YES error: &err]; Which seems to mean I don't have permission...
It doesn't matter where the user saves the file; I get the 257 error. I did all of this because when I created the directory using the NSHomeDirectoryForUser(NSUserName()) and submitted the application, Apple complained and said I needed to ask the user where to put it; but if I do I get a 257 subsequent times the program is run.
Any ideas on how to do this or get beyond the error code?
--Matthew
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden