Update workflow - mayant15/cordova-hot-code-push GitHub Wiki
Before overloading your head with all the configuration stuff - let us describe to you the update workflow of the plugin. In general, without any technical details.
- User opens your application.
- Plugin get's initialized and it launches update loader in the background thread.
- Update loader takes
config-file
from theconfig.xml
and loads JSON from the specified url. Then it comparesrelease
version of the loaded config to the currently installed one. If they are different - we go to the next step. - Update loader uses
content_url
from the application config to load manifest file. He uses it to find out, what has changed since the last release. - Update loader downloads all updated/new files from the
content_url
. - If everything went well - it sends notification, that update is ready for installation.
- Update installed, and user is redirected to the index page of your application.
And that's it. Of course, there is a little more in it, but you get the general idea on how it works.