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

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

问题描述

是这样吗?

我的应用程式在更新时崩溃,但是在下载完成后并未崩溃。当您在App Store上提交应用程式更新时,NSUserDefault会重设吗?所以我想确定更新的会话可能与新下载的会话有什么不同。

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.

干杯,
Nick。

Cheers, Nick.

推荐答案

除非用户删除应用程序,否则通常不会重置。对于基本数据,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天全站免登陆