美文网首页Cordova
使用cordova-hot-update插件增量下载

使用cordova-hot-update插件增量下载

作者: 山东菏泽朱志强 | 来源:发表于2017-02-16 18:04 被阅读2次
  1. 配置HCPUpdateRequest
  2. 根据request配置文件下载目录
  3. 主要是HCPFilesStructure *_pluginFiles
  4. 下载chcp.json
  5. 下载chcp.manifest=>new.manifest
  6. 加载本地的chcp.manifest=>old.manifest
  7. 对比new.manifestold.manifest,找出manifestDiff
  8. 将原www文件拷贝一份到xxx目录中,根据manifestDiff,从xxx中删除new.manifest中不存在的文件
  9. 根据manifestDiff下载文件
  10. 下载完成之后,将新文件拷贝到aaa目录中
  11. 重新加载内容

相关文章

网友评论

    本文标题:使用cordova-hot-update插件增量下载

    本文链接:https://www.haomeiwen.com/subject/ztuhwttx.html