Cordova
Prerequisites
Download and install Node. (This also installs npm.) https://nodejs.org/en/download/
Cordova Android Requirements (not needed if you are only doing iOS): (About 7 gigs on Windows, 8 gigs on Mac) https://cordova.apache.org/docs/en/latest/guide/platforms/android/index.html#installing-the-requirements
Installing the Android toolchain can be tricky. It's fragile: all the environmental variables and paths must be correctly set up. There doesn't seem to be an easy way to check and fix problems.
macOS/iOS
XCode 11 from App Store (about 16 gigs)
https://cordova.apache.org/docs/en/latest/guide/platforms/ios/index.html#installing-the-requirements
- .mobileprovision file
- signing certificate
Cordova Commands
Command | Windows | macOS |
---|---|---|
emulate ios | Nothing | Opens app in iOS Simulator. |
emulate android | Opens app in Android Emulator | Creates debug apk and opens in Android Emulator |
run ios --debug | Nothing | Creates debug ipa and opens app on Simulator or USB connected device. provisioningProfile and developmentTeam must be supplied in build.json. |
run android --debug | Opens app on USB connected device | Creates debug apk and opens on USB connected device |
run ios --release | Nothing | Creates signed ipa and opens app on Simulator or USB connected device. codeSignIdentity, provisioningProfile and developmentTeam must be supplied in build.json. |
run android --release | Creates signed .apk | Creates signed .apk |
Create cordova directory only | Creates all files, but does not run a Cordova command. | Creates all files, but does not run a Cordova command. |
Create and open in Xcode | Nothing | Creates all files, then launches in XCode. |
The full list of command options is in the Cordova documentation.
You can also enter the commands manually. Open a terminal window in {your project}/cordova, and enter one of the commands above or others:
$ cordova platform Installed platforms: android 8.1.0 ios 5.1.1 Available platforms: browser ^6.0.0 electron ^1.0.0 osx ^5.0.0 windows ^7.0.0
Cordova build.json
This file contains parameters for signing apps.
Android
https://cordova.apache.org/docs/en/latest/guide/platforms/android/index.html#signing-an-app
iOS
https://cordova.apache.org/docs/en/latest/guide/platforms/ios/index.html#signing-an-app