We are facing an unusual scenario where my app's plist get set to default values automatically ,mostly after restarting the ipad/iphone. Any ideas on why this happening?
We are reading the plist like this
[[NSUserDefaults standardUserDefaults] registerDefaults:[AppSetting globalConfig]];
+ (NSDictionary *) globalConfig {
NSString* plistPath = [[NSBundle mainBundle] pathForResource:@"settings" ofType:@"plist"];
return [[[NSDictionary alloc] initWithContentsOfFile:plistPath] autorelease];
}
And after saving we write it off with
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults setBool:self.isLogIn forKey:@"isLogin"];
[[NSUserDefaults standardUserDefaults] synchronize];
some more edits... does this have any thing to do with this automatic restore. i am seeing this line in the ipads who's plist was restored..
<Error>: HID: The 'Passive' connection 'appName' access to protected services is denied.
<Error>: HID: The 'Rate Controlled' connection 'appName' access to protected services is denied.