在 iPad/iPhone 中升级/更新版本后,我的应用程序中的内容会发生什么变化
中存储了我的应用程序的大量图像、书籍、音频等
我在Documents Directory/Library/caches
文件夹
。如果用户从应用商店或 iTunes 更新应用版本,所有内容会发生什么情况。在应用程序更新过程中,它们会全部被删除还是不会受到影响?
I am storing a lot of images, books, audios etc of my app in
Documents Directory/Library/caches
folder.
What happens to all the content if the user updates the version of the app from the app store or from iTunes. Will all of them get erased or will they be untouched during the app updating process?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在升级过程中它们将保持不变。不过,我想指出的是,
Caches
文件夹旨在用于仅缓存的数据,而不是您希望始终可用的数据。操作系统保留删除缓存文件夹中任何内容的权利。如果您问这个问题,那么我假设您希望数据持久存在,因此您应该知道,从 iOS 5 开始,Apple 具体来说声明缓存目录中的数据可以随时删除(应用程序运行时除外)。They will be untouched during the upgrade process. I would like to note however that the
Caches
folder is meant to be used for data that is just cached rather than data you expect to always be available. The OS reserves the right to get rid of anything in the caches folder. If you're asking this question then I assume you want the data to be persistent so you should be aware that since iOS 5, Apple specifically state that data in the caches directory can be deleted at any time (apart from whilst your app is running).他们应该保持不变。这种行为有很多现有的例子 - 尝试检查任何照片共享应用程序或在游戏中下载关卡的游戏。
They are supposed to remain untouched. There are a lot of existing examples for this behavior - try checking any photo sharing application or games that download levels in-game.