OGeek|极客世界-中国程序员成长平台

标题: IOS Enterprise Distribution 更新保留用户数据? [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 03:57
标题: IOS Enterprise Distribution 更新保留用户数据?

我正在制作一个 iPad 应用程序,它将使用企业分发程序从我自己的 Web 服务器分发。 该应用程序本身会检查服务器上的较新版本,并在 IOS 中调用 itms-services 来更新自身。这很完美。

应用程序包包含一个目录,其中包含图像和电影等资源。

Apple 声称如果 bundle-identifier 相同,更新将保留用户数据。

发件人:http://help.apple.com/iosdeployment-apps/mac/1.1/#app43ad802c

If you want users to keep the app’s data stored on their device, make sure the new version uses the same bundle-identifier as the one it’s replacing, and tell users not to delete their old version before installing the new one. The new version will replace the old one and keep data stored on the device, if the bundle-identifiers match.

当从 Xcode 直接将应用程序运行到我连接的 iPad 时,我可以删除包含我的资源的文件夹,再次运行应用程序,该文件夹仍保留在我的 iPad 上的 bundle 中。

这种行为是我所寻找的。我计划通过新的更新添加更多包含新资源的文件夹。由于资源相当繁重,我不希望用户不得不下载越来越大的文件。我只想添加新内容。

当我在没有文件夹的情况下创建新存档并像用户一样从我的网络服务器更新应用程序时,就会出现问题。然后文件夹好像被删除了。

有这方面的经验吗?



Best Answer-推荐答案


您安装的包总是被您安装的新包覆盖。文档中提到的用户数据是存储在文件系统的 Documents 和 Library 文件夹中的数据。如果您希望确保旧的包文件始终可用,您可以将它们从包中复制到应用程序的 Library/Caches 文件夹中。 值得一提的是,确保临时安装覆盖当前 bundle 的方法是确保更改 bundle 版本。

希望这有帮助

关于IOS Enterprise Distribution 更新保留用户数据?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15929784/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4