apache / cordova

Apache Cordova
https://cordova.apache.org/
584 stars 61 forks source link

how to realize hot update? #328

Closed lcy19 closed 1 year ago

lcy19 commented 1 year ago

Hi, there Are there any plugins realizing hot updates in Cordova? I tried cordova-hot-code-push-plugin and cordova-plugin-code-push, but they are achieved, and I meet errors that can't hot update.

thanks for any suggestions.

breautek commented 1 year ago

hot updates is not something inherently supported by Apache Cordova. Those 2 plugins are third-party plugins that adds support, but if they aren't working, then you would have to communicate with the plugin maintainers for support, or if they are no longer supported then you may need to fork it and address any issues yourself.

I'm not aware of any other plugins to add hot support to cordova projects.

You could try using the cordova serve command, which will run a local web server to serve the project's web assets, and you can point your <content src> to use the local webserver. It will allow you to update web assets and get them on the phone without redeploying the entire app. Automatic reloading of web assets is not a feature of cordova serve, you will have to manually refresh the webview after updating web assets which can be done via the web inspector.

We use Github Issues for tracking bugs, because there is no actual bug present here I'll be closing this issue.