I have a default settings plist file in the resources folder of my application and on first start, which is copied to the documents folder.
In future versions of the application, how can I combine the plist settings in my documents with any new keys and values (possibly nested) that were added from the previous version?
I saw a template in which properties are actually created as NSDictionary in the application (with all default settings), and then the current settings saved in the plist file are combined with this dictionary and then saved on top of the current layer.
Is this a good approach? If so, how are you going to combine NSDictionary, which can have multiple nested values with sub-arrays and sub-dictionaries?
Also, is it recommended to have a separate user plist file for settings or to always use NSUserDefaults? Does NSUserDefaults support versioning and changing defaults?
Many thanks,
Mike
source
share