NSUserDefaults 是否通过更新 Appstore 中的应用程序而持续存在? [英] Do NSUserDefaults persist through an Update to an app in the Appstore?

查看:24
本文介绍了NSUserDefaults 是否通过更新 Appstore 中的应用程序而持续存在?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是这样吗?当您在 App Store 上向应用提交更新时,NSUserDefaults 会被重置,还是会被重置?

Is this the case? Do NSUserDefaults get reset when you submit an update to an app on the App Store, or are they reset?

我的应用在更新时会崩溃,但在完全下载后不会崩溃 - 所以我试图确定更新后的会话与新下载的会话可能有什么不同.

My app is crashing when updated but not crashing when downloaded fully - so I'm trying to determine what could possibly be different in the updated session to the freshly downloaded session.

干杯,尼克.

推荐答案

它们通常不会被重置,除非用户删除应用程序.对于基本数据,NSUserDefaults 是保存偏好、日期、字符串等数据的最佳方式.如果您要保存图像和文件,文件系统是更好的选择.

They are usually not reset unless the user deletes the app. For basic data, NSUserDefaults is the best way to save data such as preferences, dates, strings etc. If you are looking to save images and files, the file system is a better bet.

这篇关于NSUserDefaults 是否通过更新 Appstore 中的应用程序而持续存在?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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