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
882 Views Asked by Karthik Kondapaneni At
5
There are 5 best solutions below
0
On
try to synchronize the user defaults
[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"YourKey"];
[[NSUserDefaults standardUserDefaults] synchronize];yourkey
0
On
I'd recommend to write a migrator routine which checks for certain former keys when the application launches and updates the defaults database respectively.
You can clear
NSUserDefaultwith below code.