当应用程序更新时,是否只是更新二进制文件,而不更新数据文件?
当有人更新他们的应用程序时,究竟会更新什么?它是否会更新捆绑包中的外部数据文件、覆盖它们、替换它们......?
What exactly will get updated when someone updates their app? Does it update external data files in the bundle, overwrite them, replace them...?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先,捆绑包中没有“外部数据文件” - 捆绑包是您的应用程序二进制文件和一些身份验证数据等,并在应用程序升级时被替换。但是,当应用程序升级时,您从捆绑包传输到应用程序的文档目录或直接写入文档目录的任何数据都会保留。
简而言之:
您的应用程序包已被完全替换。
保留应用程序文档目录中存储的数据。
First off, there are no "external data files in the bundle" - the bundle is your application binary and some authentication data, etc. and is replaced when the app is upgraded. However, any data that you transfer from your bundle to your application's document directory, or simply write directly to the document directory is retained when the app is upgraded.
In short:
Your application bundle is replaced in it's entirety.
Data stored in your application's document directory is retained.