NSUserDefaults allows you to easily read and save data from anywhere in your app. The class provides methods for accessing common types such as floats, doubles, integers, and booleans; you can also store objects of type NSData, NSString, NSNumber, NSDate, NSArray, or NSDictionary. For other object types, you'll have to use NSKeyedArchiver to store and retrieve data.

NSUserDefaults is appropriate for single data values, such as user preferences. If you need to store a large amount of similar data (records for a table, data on multiple users, etc.), then a sqlite database is more suitable.

To initialize the user defaults database, add the following to the applicationDidFinishLaunching method of your app delegate class: