Code to Remove all NSUserDefault keys:
NSString *appDomain = [[NSBundle mainBundle] bundleIdentifier]; NSString *token = [[NSString alloc] init]; token = [NSString stringWithFormat:@"%@",[[NSUsrDefaults standardUserDefaults ] objectForKey:@"device_token"]]; [[NSUserDefaults standardUserDefaults] removePersistentDomainForName:appDomain]; [[NSUserDefaults standardUserDefaults]synchronize];In the above code I have deleted all the allocated NSUserDefault to the application. And do remember to synchronize the NSUserDefault for navigating back to home screen.
0 comments:
Post a Comment
Note: only a member of this blog may post a comment.