NSUserDefaults template in Objective-C
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; [defaults setObject:variable forKey:@"myVar"]; [defaults synchronize];