Excuse my total newbie-ness. Not sure if I am heading in the total wrong direction with what I am trying to do. I am trying to use NSUserDefaults to store "state" information about a running application. For example, the last time the application was ran or a simple string.
Here is the code I am trying to use. It does generate the output, however it doesn't create the plist file. What am I missing ? This is driving me nuts!
NSMutableDictionary *defaultValues = [NSMutableDictionary dictionary];
NSString *mystring = @"TEST";
[defaultValues setObject:mystring forKey
"mykey"];
[[NSUserDefaults standardUserDefaults] registerDefaults:defaultValues];
NSString* object = [defaultValues objectForKey
"mykey"];
NSLog(@"VALUE FROM PLIST: %@",object);
Here is the code I am trying to use. It does generate the output, however it doesn't create the plist file. What am I missing ? This is driving me nuts!
NSMutableDictionary *defaultValues = [NSMutableDictionary dictionary];
NSString *mystring = @"TEST";
[defaultValues setObject:mystring forKey
[[NSUserDefaults standardUserDefaults] registerDefaults:defaultValues];
NSString* object = [defaultValues objectForKey
NSLog(@"VALUE FROM PLIST: %@",object);