I’m writing a small preference pane that needs to load and write a preferences plist created by the system. I know this can be done by manually loading the plist as a dictionary and going from there, but I was curious if it might be possible to use NSUserDefaults to do the job instead. It would cut the needed code down and would be more convenient if possible.
Does anyone have experience with this?
You can use
NSUserDefaultsonly with preferences for the current application, though for any user. You can use CFPreferences to change the defaults for other applications, orNSDictionaryif you want to read/write the plists directly.