Saving and retrieving data from NSUserDefaults

NSUserDefaults is a great way to save small amounts of data that you want to persistent across application "sessions" (especially where a database would be overkill).

Saving data:

[[NSUserDefaults standardUserDefaults] setBool:YES forKey:KEY_TO_IDENTIFY_INFORMATION];

In the above, we save the value: YES with the key:

KEY_TO_IDENTIFY_INFORMATION

Retrieving data:

[[NSUserDefaults standardUserDefaults] boolForKey:KEY_TO_IDENTIFY_INFORMATION]