cocoa - What is the best way to store document specific settings in a Core Data Document? -
I am using a NSPersistantDocument
supported by core data in my data.
There are many settings in each document that are only relevant to that document, for example, the document needs to keep the unique ID of an Address Book group, to update it later on.
The way I want to come to it, its second model should be, DocumentSetting
, which has two features; A key and a value, which is NSString
s.
Ideally I want something like NSUserDefaults
, but stored in the document.
Has anyone done this before? Is there any better way to do this?
SetdatData: NSPersistentStore can be used to store the method -document settings store metadata How to find documents about using. As has been advised in the docs, there are limitations of some sizes that can be kept there. If you need to store a bit more than some key / price combinations, then I recommend creating a new unit in my data model to store such data.
Comments
Post a Comment