删除应用程序后,存储在NSUserDefaults中的值将如何处理? [英] When the app is deleted what happens to the values stored in NSUserDefaults?

查看:54
本文介绍了删除应用程序后,存储在NSUserDefaults中的值将如何处理?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

关于 NSUserDefaults ,我有一个小问题.删除应用程序后, NSUserDefaults 中存储的值会怎样?它们也会被删除吗?

I have a little question regarding NSUserDefaults. When the application is deleted, what happens to the values stored in the NSUserDefaults? Do they get deleted as well?

当我删除应用程序并将其从应用程序商店重新安装时,是否加载了以前的 NSUserDefaults 值?

When I remove a app and reinstall it from the app store the previous NSUserDefaults values are loaded?

推荐答案

从设备删除应用程序后,与该应用程序关联的所有 local 数据也将被删除.其中包括 NSUserDefaults .但是,在线服务中存储的任何数据都不会.例如,iCloud.如果用户/开发人员要求,该应用将再次获取数据.

When an app is deleted from the device all local data associated with the app will be deleted too. This includes NSUserDefaults. However any data stored at an online service won't. For example, iCloud. The app will just fetch the data again if requested to do so by the user / developer.

修改

根据下面mAu的评论-这包括钥匙串数据,也不会删除.

As per mAu's comment below - this includes keychain data, which won't be deleted either.

这篇关于删除应用程序后,存储在NSUserDefaults中的值将如何处理?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆