Các tool, lib, plguin… tiện ích

Automation testing tool


Cordova hot-code-push not working

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


Deploying a React App to Cordova

I’ve been building out a webapp using react. It’s completely responsive and developed in device mode.

Once I was happy with it’s behavior in browsers I decided it was time to port it as a native mobile app. Below we assume the whole application has been compiled with Browserify or Webpack into an app.js file. I’m also assuming es6 syntax and inline styles.


  • declare cordova.js before your bundle. This is automatically injected by Cordova at runtime.
  • declare a viewport meta tag to prevent resizing
  • declare a Content Security Policy. Read Cordova-plugin-whitelist.