In your project's platforms
directory, you have two complete native projects: one for Android, and one for iOS. You can build release versions of these projects and publish them to Google Play or to the iOS App Store.
To publish your Android application to the Play Store:
-
Ensure that your app details are set.
android:versionName
is set using theversion
key inwww/manifest.json
.- This also sets the version of your desktop packaged app.
android:versionCode
can be set using theversionCode
key inwww/manifest.mobile.js
.- If omitted,
versionCode
will default tomajor * 10000 + minor * 100 + rev
(assumingversion
looks like"major.minor.rev"
)
- If omitted,
-
Generate a keystore and key pair (as explained in the Android developer docs).
cca exec keytool -genkey -v -keystore FILENAME.keystore -alias YOUR_PETS_NAME -keyalg RSA -keysize 2048 -validity 10000
- Create a password when prompted
- Note: the "cca exec" prefix is required only if keytool is not already available on your PATH
-
Put the following settings into a file called
android-release-keys.properties
at the root of your project (as a sibling towww/
):storeFile=FILENAME.keystore storePassword=YOUR_STORE_PASSWORD keyAlias=YOUR_PETS_NAME keyPassword=YOUR_KEY_PASSWORD
- Note:
storePassword
andkeyPassword
are optional. If omitted, you will be prompted for them when building.
- Note:
-
Build your project:
cca build android --release
-
Find your signed .apk(s) at
platforms/android/out/*-release.apk
. -
Upload your signed application to the Google Play developer console.
- Use
advanced mode
to publish multiple APKs, as described by the Multiple APKs docs.
- Use
-
Update the app version by setting the
CFBundleVersion
key inwww/manifest.mobile.js
. If not explicitly set,CFBundleVersion
will default to the same value asversion
. Ifversion
contains a dash, only the part before the dash will be used forCFBundleVersion
. -
Run
cca prepare
. -
Open the Xcode project file found under your
platforms/ios
directory:open platforms/ios/*.xcodeproj
-
Follow Apple's App Distribution Guide.