Comments (20)
Are you using local development add-on, or you are testing with the real server?
from cordova-hot-code-push.
I am testing with real server, I have tried different configurations
- with auto-load set to true or false
- manually call fetch and install update
- different settings with start, resume and now
from cordova-hot-code-push.
Is it Cordova or Ionic project? And on what platform you are testing: iOS or Android?
from cordova-hot-code-push.
I tested on iOS only, I have some own code build between cordova and ionic. the update works after I restart app 2 times, seems its not applied before I manually restart the app.
from cordova-hot-code-push.
That's strange. Will try to reproduce that.
Just of curiosity: if you will try to use local development add-on - problem remains, or everything works? Let him do all the work. You can look into the docs on how to use it.
from cordova-hot-code-push.
I set "update": "now" in chip.json, set in config.xml, reload index.html when updateInstalled event is triggered.
document.addEventListener('chcp_updateInstalled', function() {
document.location.href = 'index.html?var='+new Date().getTime();
}, false);
I need to manually close the app, and start it again to get the effect of the new change. maybe this is the way it intends to work.
A question would be is it possible to apply the change directly, or restart the app automatically, (what I did to restart is just reload index.html, maybe its not enough.)
from cordova-hot-code-push.
the change I did is just a very minor text change on one of the ionic page template.
from cordova-hot-code-push.
Well, it should reload the page automatically when the update is installed. But for some weird reason, in your case, it doesn't... Will investigate.
from cordova-hot-code-push.
I tried both iOS emulator and IOS phone, I run 8.4
Here id my config.xml that has to do with chcp
my chcp.json
{
"name": "xxxx",
"s3bucket": "xxxxx",
"s3region": "eu-west-1",
"ios_identifier": "id123456789",
"android_identifier": "xx.xxx.xxxx",
"update": "now",
"content_url": "xxxxxxxxx",
"release": "2015.11.27-15.25.57"
}
from cordova-hot-code-push.
Can someone guide me what is the correct configuration if expect app to reload with new update without manually restart app?
from cordova-hot-code-push.
Hello, I am looking through some code and try to understand, can you give me a guide on where the app is reloaded after installation success? do you restart the web view or? I was thinking if there is some cache involved when do a refresh of the url in cordova.
from cordova-hot-code-push.
Ok, found where it reloads the page.
from cordova-hot-code-push.
Tested some more, it seem the file in Library/Application support is updated, but in the running instance of the app, it still loads the old file.
from cordova-hot-code-push.
I read somewhere iOS has trouble clean cache for web view for local html. this doesn't sounds good:(
from cordova-hot-code-push.
http://stackoverflow.com/questions/2523435/how-to-clear-uiwebview-cache
don't know if this link helps, but it does seem there are no really good solution to this...
from cordova-hot-code-push.
Well, I am temporary solving it by always load js and html with timestamps, but it will be really nice if somehow the web view cache can be totally cleaned.
from cordova-hot-code-push.
+1 I also encountered the same problem.
Steps:
- Create a mock server serving www using
http-server
- Deploy the same www content onto an emulator. Now the server and device have the same content
- Make an edit in www. Generate new config/manifest without deploying
- Try relaunching the app on emulator. I had to do it twice before I saw the change
from cordova-hot-code-push.
I think the problem is based on all js, css, img resources is still cached when you reload web view, so a workaround will be always load resources with timestamp. example src="xxxx.js?23948uioew098"
If you are using requirejs, there is a parameter you can set in config that always load files with an extra param,
from cordova-hot-code-push.
Yes, the problem is with iOS and how WebView caches css and js files. I use one dirty hack to solve it, it worked before. But for some reason it's not working for you... As a workaround - yes, you can add some random query parameter to the js and css files, as you showed.
I read http://stackoverflow.com/questions/2523435/how-to-clear-uiwebview-cache before, tried hacks from there, but didn't really helped.
Will continue to search for better solution on that.
from cordova-hot-code-push.
In v1.2.0 I have changed the way on how web files are stored. Now each release has it's own www
folder. Because of that after the update css files will have a new absolute path, and WebView will use the new version, instead of the cached one. As a result - no need for timestamp hack in the file path.
from cordova-hot-code-push.
Related Issues (20)
- ionic2 中 ts代码无法import chcp HOT 1
- Failed to convert json string into application config - FAILED_TO_DOWNLOAD_APPLICATION_CONFIG (Error code -1) HOT 2
- 打包出新版本的app,但热更新代码的服务器里的www没更新,会自动下载就旧的代码覆盖 HOT 2
- Use external sdcard HOT 1
- App Keeps Crashing in Android after installing this Plugin HOT 1
- How to install using Plugman? HOT 1
- Cant make it work remotely HOT 1
- Security Concerns storing WWW files outside CODE BUNDLE. HOT 2
- Filenames with "Umlaute äöü" seen as corrupted HOT 1
- iOS 热更新不生效 HOT 2
- 每次都要把手机上的删掉 再xcode运行才会触发热更新 这不行啊 HOT 1
- 我这样集成好了之后,杀死进程,重新启动,不会触发的,必须把手机上程序卸载了,再安装的时候才会触发,这是为什么呢 HOT 2
- 什么破插件 根本就不行 他妈无语了 连个回复都没有 HOT 3
- Crash app when this plugin works with Proguard on Android HOT 2
- is this maintained ?
- Ionic3,document.addEventListener('chcp_updateLoadFailed',*) not work HOT 2
- Native plugins are getting deleted from cordova_plugin.js after fetching and installing the update using cordova-hot-code-push-plugin. HOT 1
- cordova hot code push plugin , changes are gone after restarting the applicaiton HOT 3
- cordova-hot-code-push在ios的SDK10.x成功在SDK11.x加载失败 HOT 1
- PSA: Deprecation notice 2018-09-30
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 cordova-hot-code-push.