增量更新对开发者有何影响?
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
總結
以上是生活随笔為你收集整理的增量更新对开发者有何影响?的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 神经内科临床带教中CBL教学模式的应用效
- 下一篇: node - opn库