Core Data

Core Data

I am trying to make an application on the document-based model with two persistent stores : one in the bundle, one (in) the document (questions and answers… questions are the same for all the documents…). It seems it’s not so easy to do with core data.

It is very simple to do. Since you are using a document model, let the @NSPersistentDocument@ handle the store that is being saved (the answers) and then construct a second, probably application wide, Core Data stack that loads the read-only store (the questions). You will need to write the stack code for the second one by hand but you can pretty much lift most of the code straight out of the book.