Signing and Publishing
This page includes the steps to complete the project and make it available to users on the App Store and Google Play.
1
Android (Google Play)
#Go JDK in terminal
cd /Library/Java/JavaVirtualMachines/jdkX.X.X_XXX.jdk/Contents/Home
#Create keystore and alias for signature
sudo keytool -genkey -v -keystore my-upload-key.keystore -alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000
#Copy the following part, paste it to ~/.gradle/gradle.properties file or android/gradle.properties file and adjust it according to the keystore
MYAPP_UPLOAD_STORE_FILE=my-upload-key.keystore
MYAPP_UPLOAD_KEY_ALIAS=my-key-alias
MYAPP_UPLOAD_STORE_PASSWORD=*****
MYAPP_UPLOAD_KEY_PASSWORD=*****
#Paste the code I showed you into your project's android/app/build.gradle file.
...
android {
...
defaultConfig { ... }
signingConfigs {
release {
if (project.hasProperty('MYAPP_UPLOAD_STORE_FILE')) {
storeFile file(MYAPP_UPLOAD_STORE_FILE)
storePassword MYAPP_UPLOAD_STORE_PASSWORD
keyAlias MYAPP_UPLOAD_KEY_ALIAS
keyPassword MYAPP_UPLOAD_KEY_PASSWORD
}
}
}
buildTypes {
release {
...
signingConfig signingConfigs.release
}
}
}
...
#for ABB
cd android && ./gradlew bundleRelease
#After this process, .aab will be created in android/app/build/outputs/bundle/release/app.aab and is ready to be uploaded to Google Play.
#for APK
cd android && ./gradlew app:assembleRelease
#After completing the steps, you will see the APKs in android/app/build/outputs/apk/releaseLast updated