Thursday, September 18, 2014

NSUserDefault in xcode 6 ios simulator not deleted with application

After installing xcode 6, when deleting application from ios simulator, the data saved in NSUserDefault does not deleted with the application.

This is a bug in the xcode 6 simulator. To overcome this issue, either reset the simulator or call the below code in didFinishLaunchingWithOptions method

  NSString *appDomain = [[NSBundle mainBundle] bundleIdentifier];
   [[NSUserDefaults standardUserDefaults] removePersistentDomainForName:appDomain];
 

No comments:

Post a Comment