Thursday, 12 November 2020

Sharing model between documents in a document-based app

My app is a document-based and uses NSPersistentDocument to manage its Core Data stack.

It works great when each document has its own data, but now I want documents to share parts of their model. In my case, the users import large files and I don't want to copy them for each document.

I want to have a model that is tight to the app itself and not to the particular document.

I'm not really sure how to go about it. NSPersistentDocument provides some methods to override for configuring Core Data stack but I don't know how to set it up. Can anyone give me some tips how to achieve that?



from Sharing model between documents in a document-based app

No comments:

Post a Comment