Where to save state in iPhone app

I'm wondering where you can save the current state of the application when iCloud and iOS5 changed the operation of various parameters.

NSUserDefaults? I always got the impression that it was for the settings. Is this normal for the condition?

NSDocumentDirectory application? Isn't it syncing with iCloud? I have no particular desire to load the state of the application. It is not necessary.

Caches? This has been refined from time to time. This is not a safe place to store things.

So, what is the official, recommended place to stay in these days?

+7
source share
1 answer

It seems to me that iOS developers usually use NSUserDefaults, although this means that you specify for custom settings.

For example, I recently added the popular Appirater library for my application and found that it uses NSUserDefaults to store its state (for example, how many times the application has been launched).

+5
source

All Articles