I'm using NSUserDefaults to hold some data while my app is running, but I want to dump all the data on app termination. Is this possible, and if so how do I do this? Thanks! ~Carpetfizz I know that there's this, but I'm not sure where to put it. Should it go in the app delegate?
NSString *appDomain = [[NSBundle mainBundle] bundleIdentifier];
[[NSUserDefaults standardUserDefaults] removePersistentDomainForName:appDomain];
- (void)applicationWillTerminate:(UIApplication *)application
{
// NSString *appDomain = [[NSBundle mainBundle] bundleIdentifier];
//[[NSUserDefaults standardUserDefaults] removePersistentDomainForName:appDomain];
[NSUserDefaults resetStandardUserDefaults];
}