Re: NSPersistentDocument Migration with Sandbox

2013-05-15 Thread Jim McGowan
For the sake of the archives, here is how I solved this issue: First off, I turned off automatic migration in my NSPersistentDocument subclass I overrode -openDocumentWithContentsOfURL:display:completionHandler: in a subclass on NSDocumentController. In this method I check the UTI of the URL p

Re: NSPersistentDocument Migration with Sandbox

2013-05-10 Thread Jim McGowan
On 11 May, 2013 2:07:18 HKT, Quincey Morris wrote: > On May 10, 2013, at 07:12 , Jerry Krinock wrote: > >> I think that it would help to have a higher-level understanding of the >> problem. How about this… >> >> You have a sandboxed app in which the user has somehow opened a document >> ou

Re: NSPersistentDocument Migration with Sandbox

2013-05-10 Thread Quincey Morris
On May 10, 2013, at 07:12 , Jerry Krinock wrote: > I think that it would help to have a higher-level understanding of the > problem. How about this… > > You have a sandboxed app in which the user has somehow opened a document > outside your sandbox (because the user navigated to it in an Open

Re: NSPersistentDocument Migration with Sandbox

2013-05-10 Thread Jerry Krinock
On 2013 May 09, at 23:26, Jim McGowan wrote: > Core Data document migration will try to write the migrated store to the same > directory as the original, but the sandbox blocks this. I think that it would help to have a higher-level understanding of the problem. How about this… You have a s

Re: NSPersistentDocument Migration with Sandbox

2013-05-09 Thread Jim McGowan
On 9 May, 2013, at 1:56:29 PM HKT, Jerry Krinock wrote: > >> sandboxd gives this message on the console: >> >> deny file-write-create /Users/jimmcgowan/Desktop/.AGPS >> Examples.rtd.migrationdestination_41b5a6b5c6e848c462a8480cd24caef3 > > I've never worked with a sandboxed document, but the

Re: NSPersistentDocument Migration with Sandbox

2013-05-08 Thread Jerry Krinock
On 2013 May 08, at 21:20, Jim McGowan wrote: > sandboxd gives this message on the console: > > deny file-write-create /Users/jimmcgowan/Desktop/.AGPS > Examples.rtd.migrationdestination_41b5a6b5c6e848c462a8480cd24caef3 I've never worked with a sandboxed document, but the above error says that

NSPersistentDocument Migration with Sandbox

2013-05-08 Thread Jim McGowan
Hi, I'm working on an update to a Core-Data document app, and have a new version of the document model. I've got automatic migration (with a mapping model) of documents in the old format working fine when the app is run without sandboxing. However, when running in the sandbox, migration fails