Comments (11)
可以的,不过需要我更新一个版本来支持,你能详细说一下你的需求吗?
from doctorstrange-updater.
因为我们做的是离线应用 没有网 只在app需要更新的时候使用网络请求服务器 然后下载静态资源到本地 目前做法是手动拷贝 资源都是file:///sdcard/img/xx.jpg形式引用 看过codepush 貌似只能更新require的图片跟打包的js 无意中翻到了这个插件 很棒 谢谢啦!
from doctorstrange-updater.
你们的静态资源为什么要放在sd卡上呢?很容易被用户删除掉
from doctorstrange-updater.
因为图片视频都是动态展示的 通过sql的字段路径 require方式不能动态引用 试了下只有file引用模式可以 另外我们做的是大屏展示类应用 用户只能在APP内操作 不能出去
from doctorstrange-updater.
那么你们的静态资源实际上是不属于更新数据了,我建议你单独写一个下载组件进行下载,热更新能做的事情应该是在必要的时候更新代码相关的东西
例如:你在使用某个组件进行播放图片的操作时,这个组件会有一个加载的时间,在这个加载时间里下载必要的静态资源,这样不行吗?
from doctorstrange-updater.
单独更新也是可以的 使用过程中不能下载东西 更新操作时候一次更新完 sql和资源 这样最好 我是专门做前端的 安卓原生部分不太了解 所以只能找些轮子
from doctorstrange-updater.
所以你们下载的是一个sqlite的db文件,这个文件会常变吗?如果都使用到了sqlite说明你们的静态资源是不常变的吧
from doctorstrange-updater.
如果这个静态资源不常变,Android 可以在发原生包(apk)的时候将静态资源打包到assets中,IOS可以直接打包在沙盒中,就不用费力去更新了
from doctorstrange-updater.
会经常变的 有新内容维护更新进去 哈哈 没事 目前还没到那个阶段 再考虑解决方案
from doctorstrange-updater.
你可以fork我这个项目对它做一些简单修改, FS
模块已经封装好了,你还只需要改一下,index.js
里面的部分代码,用FS.downloadFile
下载文件(可以指定保存路径,不过要注意苹果的沙盒),然后配合你们的服务端做出相应调整就行了,但那不属于热更新范畴了,你实际上是在利用这个包去下载额外的文件,我可能不好提供这个功能,你可以自己修改
from doctorstrange-updater.
恩 我只在安卓上使用 可以尝试下 thankyou
from doctorstrange-updater.
Related Issues (2)
- 这个更新的js是全量的bundle包吗 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from doctorstrange-updater.