views:

77

answers:

1

Compare the following:

  • using NSUserDefaults saving it with synchronize
  • using NSDictionary saving it with writeToFile in the app Documents folder

What are the differences? Personally, I prefer to mantain different NSDictionary organized by topic rather than use a single NSUserDefaults.

Am I thinking something wrong? Thanks

+1  A: 

It depends on the kind and amount of data that you want to save and how you want to access this data. Property list files in the documents directory can be deserialized on demand while the user preferences are usually read early after launching the app. They also contain keys owned by the system.

Nikolai Ruhe