Krunal Patel
Krunal Patel

Reputation: 59

How do i publish an updated version of my existing ionic app on google play store?

I have recently launched my first ionic app on play store and now i want to publish a updated version.

I have the .keystore file and its password with me but i am not getting the steps to generate the release apk to update my existing ionic app.

I would appreciate a help. Thanks

Upvotes: 2

Views: 4969

Answers (4)

Jain Bhavesh
Jain Bhavesh

Reputation: 578

Update version from config.xml

now run release command here

ionic cordova build android --release --prod

Upvotes: 0

Sorin Veștemean
Sorin Veștemean

Reputation: 1920

  1. Update version in config.xml, you should have on the 2nd line selector , with these 2 attributes , modify them

Example:

FROM android-versionCode="10001" version="1.0.1"

TO android-versionCode="10002" version="1.0.2"

  1. To be extra safe and good practice, delete and add again the plaftorm you want to deploy

Example (for android):

cordova platform remove android cordova platform add android

  1. Build ionic cordova build --release android

  2. Copy your resulted apk , to root project (you cand find the build here /platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk )

  3. Sign the release jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore android.keystore app-release-unsigned.apk android_app

6.Optimize the apk zipalign -v 4 app-release-unsigned.apk app-release.apk

Upvotes: 0

JanP
JanP

Reputation: 1581

Start with changing the android-versionCode, android-versionName (optional) and version attributes in the widget tag in your config.xml.

Then remove all plugins you only use for development, like console:

$ cordova plugin rm cordova-plugin-console --save

Build your release version:

$ cordova build --release android

Sign your release build with the key from your keystore. In below example the keystore is in the root of your project, but of course it's also possible to define another path:

$ jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore projectnaam.keystore platforms/android/build/outputs/apk/android-release-unsigned.apk PROJECTNAAM_KEY

If you use for example Crosswalk, you might have more than one APK for different native platforms and will have to sign them separately (repeat above for each APK).

Zipalign your signed APK:

$ zipalign -v 4 platforms/android/build/outputs/apk/android-release-unsigned.apk platforms/android/build/outputs/apk/android-release.apk

And finally upload platforms/android/build/outputs/apk/android-release.apk to the Play Store and publish the app.

After that you might want to install console plugin for further development:

$ cordova plugin add cordova-plugin-console --save

Upvotes: 8

Manish Jain
Manish Jain

Reputation: 2339

You have to update versionCode and versionName in the app build.gradle.

Example: Suppose at the time of first app upload on playstore your version had:

versionCode 1

versionName "1.0"

Now, you have to change it (for make it next release version):

versionCode 2 versionName "1.1".

After that, in Android Studio, Click on Build-> Generate Signed Apk.

A popup appears with signed apk details such as keystore path, store password, key alias, key password. Fill those details and click on Next. After it select apk destination folder and select build type as release and then tap on Finish. You will get the release signed apk in the destination folder.

Open you google developer console, and select the application. Upload the new apk and publish it.

Upvotes: 2

Related Questions