Is there any way to clear all data stored from the installation of app?
问题 I have an iOS app which stores data in NSUserDefults and many other data is set in cache as a result of web view load, social media signing etc. I want to remove all the data from cache created by the app. Is there any way to do this programmatically in iOS? 回答1: Try NSString *appDomain = [[NSBundle mainBundle] bundleIdentifier]; [[NSUserDefaults standardUserDefaults] removePersistentDomainForName:appDomain]; or [[NSUserDefaults standardUserDefaults] setPersistentDomain:[NSDictionary