Cocoa : Once and for all, how to really reset the standardUserDefaults
Posted
by
Korion
on Stack Overflow
See other posts from Stack Overflow
or by Korion
Published on 2011-11-24T16:04:58Z
Indexed on
2011/11/24
17:50 UTC
Read the original article
Hit count: 182
I tried using -resetStandardUserDefaults, I tried removing the plist file, none of those really do what I need. I want to reset my preferences completely, as if the app re-installed. Is there a good solution to this?
I tried :
NSString *appDomain = [[NSBundle mainBundle] bundleIdentifier];
[[NSUserDefaults standardUserDefaults] removePersistentDomainForName:appDomain];
But Xcode complains. Apparently, it doesn't like that the plist file has disappeared.
© Stack Overflow or respective owner