增量更新对开发者有何影响?
Apple自iOS6起引入了非常優(yōu)雅的解決方案。把大部分事情都自己做了,開發(fā)者面對增量更新并沒有新的煩惱,當(dāng)然更不必要開發(fā)者提交多個(gè)增量包,也不影響審核的時(shí)間。
簡單來說,App store會讀取開發(fā)者所提交application bundle里面的所有內(nèi)容,然后逐一用新版本對照此前的每一個(gè)舊版本,而后只取每一次對比不同的部分,最后生成不同的多個(gè) patch package,給不同舊版本的用戶下載。
通俗的講就是,假設(shè)一個(gè)2.1版本號的bug修復(fù)最新包,完整包大小是100MB,和2.0版本號對比后的增量包是10MB,那么用戶下載的時(shí)候需要的更少的時(shí)間,節(jié)省更多的流量。不過依據(jù)具體情況不同,安裝時(shí)間可能也不同。主要由于對比版本生成增量包的時(shí)間不同所致。
蘋果官方文檔給出了兩個(gè)注意事項(xiàng)和一個(gè)提示:
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、修改的內(nèi)容最好獨(dú)立存儲,避免修改大尺寸的舊內(nèi)容文件: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、不要依賴不同文件創(chuàng)建和修改時(shí)間,app store的diff對比會忽略metadata,即前后同樣名字和大小的文件會被當(dāng)成同一個(gè):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
總結(jié)
以上是生活随笔為你收集整理的增量更新对开发者有何影响?的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 神经内科临床带教中CBL教学模式的应用效
- 下一篇: node - opn库