gpt4 book ai didi

iphone - 在应用程序更新时,自定义 plist 文件将得到更新,或者我们需要做些什么吗?

转载 作者:搜寻专家 更新时间:2023-10-30 20:18:51 26 4
gpt4 key购买 nike

我在 Appstore 中有一个应用程序,现在我要推出应用程序更新,我有一个自定义 Plist 文件,其中包含我的应用程序包中的一组值,并且这些值已从生产中的版本和此外,还有更多的键值对被添加到该文件中。

现在我怀疑是否要将此应用程序更新到 AppStore 更新过程会自动覆盖(更新)我在现有文件之上的新 plist 文件还是我们需要像我们一样做一些工作为核心数据迁移等数据库更改做些什么?

最佳答案

如此处解释:iOS App Programming Guide ,这是您更新应用程序时发生的情况:

Files Saved During App Updates

When a user downloads an app update,iTunes installs the update in a new app directory. It then moves theuser’s data files from the old installation over to the new appdirectory before deleting the old installation. Files in the followingdirectories are guaranteed to be preserved during the update process:

  • Application_Home/Documents
  • Application_Home/Library

Although filesin other user directories may also be moved over, you should not relyon them being present after an update.

这意味着您的 bundle 中的所有资源都将“丢失”,您将从新 bundle 中获得新资源。如果您将此 plist 文件用于只读目的,这将不是问题,如果您在此文件上保存了一些用户首选项,恐怕这些用户信息将会丢失。您应该始终将此类数据保存在文档目录中!

关于iphone - 在应用程序更新时,自定义 plist 文件将得到更新,或者我们需要做些什么吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18894892/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com