I’d like to add functional data in the NSUserDefaults object but I’m a little bit embarrassed as for me this object is more for application settings than for functional stuff.
Does it make sense to use NSUserDefaults for this purpose ?
I’d like to add functional data in the NSUserDefaults object but I’m a little
Share
A NSUserDefaults is a plist with features designed to store user preferences. It’s often used instead a regular plist to save a couple of lines of code, which I think it’s a bad idea because you get an additional complexity unrelated to your task, but it’s unlikely to cause trouble. If it eases your mind learn to read/write a regular plist. It’s easy.
Using the NSKeyedArchiver/NSKeyedUnarchiver to serialize graphs of objects is another way to read/write plists that it’s worth the time learning.