Publishing
Publishing to Google Play
Publishing a NativeScript is generally the same as publishing any other Android app, documented in the Official Android Docs
Prerequisites
Before following this guide, make sure you have a valid Google Play developer account.
- Set your application id
- Set your application Name
- Change your launcher icons
- Change your launch screen
Generating an upload keystore
To upload .apk
or .aab
files to Google Play, you must first sign them with an upload key. To be able to sign, you need to generate a keystore if you don't already have one. Follow the Android docs to generate a new keystore for your app.
Building an .aab
(or .apk
)
The following commands will build your app in release mode, and copy the result to the dist/
folder since we are passing in the --copy-to
flag.
ns build android --release \
--key-store-path <path-to-your-keystore> \
--key-store-password <your-key-store-password> \
--key-store-alias <your-alias-name> \
--key-store-alias-password <your-alias-password> \
--aab \
--copy-to dist/build.aab
ns build android --release \
--key-store-path <path-to-your-keystore> \
--key-store-password <your-key-store-password> \
--key-store-alias <your-alias-name> \
--key-store-alias-password <your-alias-password> \
--apk \
--copy-to dist/build.apk
ns build android --release \
--key-store-path C:\projects\app\upload.keystore \
--key-store-password example_password \
--key-store-alias upload \
--key-store-alias-password example_password \
--aab \
--copy-to dist\build.aab
ns build android --release \
--key-store-path ~/projects/app/upload.keystore \
--key-store-password example_password \
--key-store-alias upload \
--key-store-alias-password example_password \
--aab \
--copy-to dist/build.aab
Uploading to Google Play
Once you've successfully built your .aab
or .apk
head over to the Google Play developer console, and create a draft release. Upload your .aab
or .apk
.