updated IOS app with changes in NSUser default keys ( added few more keys and changed some existing key names) app is crashing at initialization time after updating from store . If I delete the app completely and reinstall it then it is working fine . We can not clear previous NSUser defaults and recreate it when updating app ( I mean complete re-installation by writing some logic in updated app)?.
NSUserDefaults changed IOS app crashing after update
870 Views Asked by Karthik Kondapaneni At
5
There are 5 best solutions below
0

You can clear NSUserDefault
with below code.
[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"yourkey"];
0

try to synchronize the user defaults
[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"YourKey"];
[[NSUserDefaults standardUserDefaults] synchronize];yourkey
you can usuually clean out the entire NSUserDefaults by doing this, just in case you forgot the key or something: