开发者

How to delete data in userdefaults in iPhone when apps are uninstalled?

开发者 https://www.devze.com 2023-01-11 23:45 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号