How to delete data in userdefaults in iPhone when apps are uninstalled?
The NSUserDefaults class provides us a convenient way to store/restore shared data. But I got a question: how to delete data when user uninstalls the app? 开发者_如何学JAVAAs we all know, apps should clean all its data/files when it's deleted. Leaving anything that won't be used anymore shouldn't happen, isn't it? As far as I know, an app will never know when it's uninstalled. How to remove the shared data in userdefaults then?
The iPhone automatically deletes all of an app's data when it deletes the app. That's all. No need to clean up.
精彩评论