Book Image

Learning Ionic

By : Arvind Ravulavaru
Book Image

Learning Ionic

By: Arvind Ravulavaru

Overview of this book

Table of Contents (19 chapters)
Learning Ionic
Credits
Foreword
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Generating installers using the Cordova CLI


Now we are going to generate installers for Android and iOS using the Cordova CLI.

Android installer

First we are going to take a look at generating an installer for Android using the Cordova CLI. You can perform the following steps:

  1. Open a new terminal/prompt at the root of the project.

  2. Remove unwanted plugins:

    ionic plugin rm cordova-plugin-console
    
  3. Build the app in release mode:

    cordova build --release android
    

    This will generate an unsigned installer in release mode and place it at /platforms/android/build/outputs/apk/android-release-unsigned.apk.

  4. Next, we need to create a signing key. If you already have a signing key or you are updating an existing app, you can continue to Step 6.

  5. The private key is generated using the key tool. We will create a folder named deploy-keys and then save all these keys there. Once the folder is created, using the cd command, go to the folder and run this:

    keytool -genkey -v -keystore app-name-release-key.keystore -alias...