Reputation: 1035
I know NSUserDefaults saves data in a app, so data is cleared after deleting app under iOS 8. but data persists after deleting app in iOS 8.
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
Below codes works in iOS 8 (data is cleared after deleting app)
NSUserDefaults *defaults = [[NSUserDefaults alloc] initWithSuiteName:@"group.com.AppCompany.Appname"];
Does this code works under iOS 8?
Upvotes: 0
Views: 511
Reputation: 1918
If you are running your application in ios Simulator NSUserDefaults will not be cleared . it is the simulator bug .It work perfectly in ios device.
Upvotes: 1