🔆
Mobile Platforms

Android

To release a game on Android, consider following Ionic / Capacitor release process.

General overview:

  1. Create the game.
  2. Install Android Studio.
  3. If platform hasn’t been added yet, add it:
$ npm add android
  1. Build an Android project:
$ cordova-res android --skip-config --copy
$ cordova-res ios --skip-config --copy
$ ionic cap build android
# For consecutive updates, you can also use "ionic cap copy android"
  1. 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

  1. Create and move assets to separate module in Android Studio (ex. assetspack, don’t use dashes in the module name.)
  2. 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.
  3. Add build.gradle file to the assetspack:
apply plugin: 'com.android.asset-pack'

assetPack {
    packName = "assetpack"
    dynamicDelivery {
        deliveryType = "install-time"
    }
}
  1. Add assetspack reference to the build.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 {
    // ...
}
  1. Include assetpack reference in settings.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'
  1. Update the app version in the original module build.gradle (increment both versionCode and versionName.)

  2. Build project using Build -> Generate Signed App Bundle.

iOS

Version 0.1.x of Default Cube hasn’t been tested on iOS, yet. Primary goal of version 0.2.x is to make the framework work nicely on Apple devices.