Skip to content

Instantly share code, notes, and snippets.

@luciopaiva
Last active November 3, 2019 12:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luciopaiva/2245d413558fd722ece983326dc5fa7c to your computer and use it in GitHub Desktop.
Save luciopaiva/2245d413558fd722ece983326dc5fa7c to your computer and use it in GitHub Desktop.

Things I learned while playing with Cordova

  • use Webstorm to develop your app
  • deploy via Webstorm (it has a Cordova configuration template)
  • try your app in Chrome by clicking the Chrome button in Webstorm
  • configure JetBrains IDE plugin in Chrome to allow for cross-origin requests
  • your Android app will complain about cross-origin requests as well
  • you can debug your deployed Android app via Chrome through chrome://inspect
  • if you're previewing your page in Chrome, you may need to disable web security in order to use fetch() pointing to other domains. See this
  • to avoid having Webstorm accidentaly running the emulator because your real device is no longer being seen, create a Cordova run configuration, pass run as Command, choose android as Platform and, most importantly, pass --device as Extra arguments (this will force Webstorm to give up instead of falling back to the emulator)
  • use watch -n1 adb devices to keep track of your mobile connection, because it breaks sometimes (macOS users may have to brew install watch first)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment