Somehow, the below mentioned code seems to delete my ~/Library/Preferences/NAME.PRODUCT.plist
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults setValue:NO forKey:@"ViewFirstShown"];
[defaults synchronize];
I can confirm the plist file exists before these lines are called. But the plist file disappears immediately after running the above codes.
I thought synchronise
writes the values to the disk
immediately. I tried waiting a while too, but the plist just doesn't re-appear.
Am I missing anything?
Thanks in advance.