Mobile Platforms ⌘
Android
To release a game on Android, consider following Ionic / Capacitor release process.
General overview:
- Create the game.
- Install Android Studio.
- If platform hasn’t been added yet, add it:
$ npm add android
- Build an Android project:
$ cordova-res android --skip-config --copy
$ ionic cap build android
# For consecutive updates, you can also use "ionic cap copy android"
- In Android Studio, either run a development preview of the game, or build the project as an Android App Bundle to release it.
Note: Google Play store has a app size limit of 150MB. If your game assets exceed this limit, you can use this guide or see below.
Android - Bundling Game Asseets
- Create and move assets to separate module in Android Studio (ex.
assetspack
, don’t use dashes in the module name.) - Replicate structure of the original module (ie. put assets in
assetpack/src/main/assets/public/static/media
.) Be sure to remove the assets from the original module. - Add
build.gradle
file to theassetspack
:
apply plugin: 'com.android.asset-pack'
assetPack {
packName = "assetpack"
dynamicDelivery {
deliveryType = "install-time"
}
}
- Add
assetspack
reference to thebuild.gradle
of the original module (remember to prefix the name with a:
):
apply plugin: 'com.android.application'
android {
compileSdkVersion rootProject.ext.compileSdkVersion
// ...
assetPacks = [ ":assetpack" ]
}
repositories {
// ...
}
- Include
assetpack
reference insettings.gradle
:
include ':app'
include ':capacitor-cordova-android-plugins'
project(':capacitor-cordova-android-plugins').projectDir = new File('./capacitor-cordova-android-plugins/')
include ':assetpack'
apply from: 'capacitor.settings.gradle'
-
Update the app version in the original module
build.gradle
(increment bothversionCode
andversionName
.) -
Build project using
Build -> Generate Signed App Bundle
.
iOS
To release a game on iOS, consider following Ionic / Capacitor release process.
General overview:
- Create the game.
- Make sure you have the latest version of XCode installed (MacOS is required to build iOS apps.)
- If platform hasn’t been added yet, add it:
$ npm add ios
- Build an iOS project:
$ cordova-res ios --skip-config --copy
$ ionic cap build ios
# For consecutive updates, you can also use "ionic cap copy ios"
- Run XCode and test the app in the emulator or remote device. To release the app, prepare the bundle and upload it to an active AppStore distribution account.