I have saved an NSString
in my NSUserDefault
with key @"userKey"
.
I want to be able to reset this value to @""
when the app is totally shut down but not when it enters the background.
I have tried:
[[NSUserDefaults standardUserDefaults] setObject:@"" forKey:@"opponentFile"];
in my appdelegate's -applicationWillTerminate:
but nothing happens.
When I open the app after completely closing it the default value is still there.
How do I do this?