The Ionic book-part6 release your app

Source: Internet
Author: User

Original address: http://ionicframework.com/docs/guide/publishing.html

Please respect other people's labor results, reproduced please indicate the source, thank you

Previous article: The Ionic book-part5 Perfect your application

Now that we have a running application, we are ready to push it to the real world! Because Ionic's founder Drifty has submitted the Todo app in this tutorial to the App Store, you can follow this section to submit your own app.

First we need to release a version of our app that targets every platform we want to deploy. Before we deploy, we need to be aware that the plugins needed during development are tuned to a non-production environment model. For example, we may not want the debug window plugin to be turned on, so we should be able to remove it when generating the release version:

$ Cordova Plugin RM org.apache.cordova.console

Android Publishing

We can generate an Android release version with the following Cordova CLI command:

$ Cordova Build--release Android

This command will generate a release version based on your settings in config. Your Ionic app will have some pre-set values in this file, but if you want to define how your app will be published, you can edit the file to suit your needs. Read the. config file to get more information.

Next, we will be able to see our unsigned apk file under the Platforms/android/bin directory. In our example, this file is platforms/android/bin/helloworld-release-unsigned.apk. Now we need to sign the unsigned apk and run a calibration tool to optimize it and then show it in the App Store. If you already have a signed secret key, you can ignore these steps to use your secret key directly.

Let's use the Keytool command that comes with the JDK to generate a secret key of our own. If you do not find this tool, please refer to the installation instructions:

$ keytool-genkey-v-keystore my-release-key.keystore-alias alias_name-keyalg rsa-keysize 2048-validity 10000

You will first be asked to create a new password for your secret key. Then answer the rest of the questions about the tool, and then the end, there should be a My-release-key.keystore file under the current path.

Note: Make sure this file is kept in a safe place and if you lose it you will not be able to submit updates for your app!

To sign an unsigned apk, you need to run the Jarsigner tool in the JDK:

$ jarsigner-verbose-sigalg sha1withrsa-digestalg Sha1-keystore My-release-key.keystore helloworld-release-unsigned.apk Alias_name

This will give the apk a signature. Finally, we need to run the zip calibration tool to optimize this apk:

$ zipalign-v 4 helloworld-release-unsigned.apk helloworld.apk

Now that we have the final version of the installation file helloworld.apk, we can publish it to the Google Play store for people around the world to use!

(There are other ways to sign APKS.) You can refer to the official Android App signing documentation for more information. )

Google Play Store

For Google Play store, we have ready our release apk, we can create a Play store list and upload our apk.

You want to visit the Google Play Store Developer console and create a new Development Account. Unfortunately, this is not for free. But comparing Apple's $99,android is only about $.

Once you have a Development account, you can click "Publish an Android apps on Google Play" like this:

Next you'll be able to click on the button to edit the store list (we'll go to bed with our apk later). You need to fill out a description of your application. Below is a simple preview of the Ionic Todo app when we fill it out:

When you're ready, upload the release version of the APK and publish it to the list. Be patient, your work will be known all over the world!

Update your App

Because you have developed your app, you also need to update it regularly.

In order for the Google Play store to accept the updated APKS, you need to edit the Platforms/android/androidmanifest.xml file to continually increase the value of Android:versioncode.

The Ionic book-part6 release your app

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.