0
votes

I've installed the plugin cordova plugin add cordova-hot-code-push-plugin and have started the server cordova-hcp server in the app directory

In the config.xml I've specified the below configurations

<chcp>
    <config-file url="https://498b62ba.ngrok.io/chcp.json"/>
    <auto-download enabled="true" />
    <auto-install enabled="true" />
</chcp>

When I change any file in the www folder, I get a log in the cordova-hcp server console

Build 2016.07.02-16.10.16 created in /Users/my.name/Documents/Cordova_Workspace/MyProject/www
Should trigger reload for build: 2016.07.02-16.10.16

When I launch, or re-launch the app (on real Android phone), I get a logs the android console

07-02 15:45:22.499 7795-7869/? D/CHCP: Starting loader worker 
07-02 15:45:22.501 7795-7869/? D/CHCP: Failed to update
07-02 15:45:22.501 7795-7869/? D/CHCP: Can't load application config from installation folder. Reinstalling external folder
07-02 15:45:22.502 7795-7869/? D/CHCP: Current release is corrupted, reinstalling www folder from assets
07-02 15:45:22.502 7795-7869/? D/CHCP: Dispatching before assets installed event

Due to this no changes are reflected in the app. Need help over this.

1

1 Answers

1
votes

The problem is resolved. Looking at forums, below are the correct steps

  1. Run cordova plugin add cordova-hot-code-push-plugin in the project
  2. Install npm install -g cordova-hot-code-push-cli on the system
  3. Run cordova-hcp init and enter details
  4. Run cordova-hcp build
  5. Add the following in config.xml

    <chcp> <config-file url="https://example.com/chcp.json"/> </chcp>

  6. Run cordova build