您的位置:首页 > 其它

增量更新对开发者有何影响?

2015-12-24 15:50 323 查看
Apple自iOS6起引入了非常优雅的解决方案。把大部分事情都自己做了,开发者面对增量更新并没有新的烦恼,当然更不必要开发者提交多个增量包,也不影响审核的时间。

简单来说,App store会读取开发者所提交application bundle里面的所有内容,然后逐一用新版本对照此前的每一个旧版本,而后只取每一次对比不同的部分,最后生成不同的多个 patch package,给不同旧版本的用户下载。

通俗的讲就是,假设一个2.1版本号的bug修复最新包,完整包大小是100MB,和2.0版本号对比后的增量包是10MB,那么用户下载的时候需要的更少的时间,节省更多的流量。不过依据具体情况不同,安装时间可能也不同。主要由于对比版本生成增量包的时间不同所致。

苹果官方文档给出了两个注意事项和一个提示:

1、别做不必要的文件修改:Do not make unnecessary modifications to files. Compare the contents of the prior and new versions of your app with
diff or another directory comparison tool and verify that you've only changed what you expect within your app bundle

2、修改的内容最好独立存储,避免修改大尺寸的旧内容文件:Content that you expect to change in an update should be stored in separate files from content that
you don't expect to change. This reduces the size of the update package and increases its install speed.

3、不要依赖不同文件创建和修改时间,app store的diff对比会忽略metadata,即前后同样名字和大小的文件会被当成同一个:Your app should not rely on the creation and modification
dates of files in your application bundle. When your app is updated using an update package, files are updated only if their content changes and will not be updated if only their metadata (e.g. creation and modification date) changes.

官方文档链接:Reducing Download Size for iOS App Updates
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: