The NSUserDefaults class provides convenient methods for accessing common types such as floats , doubles , integers , Booleans and URLs .
The default object should be a list of properties, that is, an instance (or, for collections, a combination of instances): NSData , NSString , NSNumber , NSDate , NSArray or NSDictionary .
If you want to save any other type of object, you must archive it to create an instance of NSData .
For more information, see NSUserDefaults Class Help.
source share