Generating Installers using Cordova CLI
We will look at creating installers using Cordova CLI.
Android installer
First, we will take a look at generating an installer for Android using the CLI. You can follow the given steps:
- Open a new command prompt/terminal at the root of the project.
- Remove unwanted plugins using the following:
ionic plugin rm cordova-plugin-console
- Build the app in release mode with the following:
cordova build --release android
This will generate an unsigned installer in release mode and place it at <<ionic project>>/platforms/android/build/outputs/apk/android-release-unsigned.apk
.
- Next, we need to create a signing key. If you already have a signing key or you are updating an existing app, you can skip the next step.
- The private key is generated using the keytool. We will create a folder named deploy-keys and save all these keys there. Once the folder is created, run the
cd
command and navigate into the folder and run this:
keytool -genkey -v -keystore app-name...