Build Construct app for Mobile platforms

This guide explains how to build Android and iOS Construct app.

CAS.AI Addon only supports building mobile apps locally with Cordova CLI, as cordova-plugin-casai is not yet whitelisted for Server build.

Construct 3 has its own mobile app build service. For most users this is the recommended way to build mobile apps. However there are limits on which third-party Cordova plugins can be used, and the build involves uploading your project and downloading an APK, which can be slow with large projects or slow connections. Using the Cordova CLI allows offline builds and use of any third-party Cordova plugins.

Setting up Cordova

To set up the Cordova CLI on your computer, you'll first need to install Node.js. Then install the cordova module using npm. For Windows, use the command:

npm install -g cordova

On macOS or Linux use the command:

sudo npm install -g cordova

For more information, see the section Installing the Cordova CLI in the Cordova documentation.

At this point you should be able to enter the command cordova in a command prompt or terminal, and see that it prints help text about using Cordova.

For Android builds, you'll need to install the JDK (Java Development Kit) and Android Studio. For more information see the Cordova Android Platform Guide.

Exporting from Construct

In Construct 3, choose the Android (Cordova) or iOS (Cordova) options when exporting, depending on which platform you want to build for.

In the Cordova options dialog, choose Cordova project for Android build or iOS build. Construct 3 will export a zip file. Extract this zip file to a folder on your computer.

  • Set Minimum Android API level 23 or higher.
  • Set Minimum Target iOS version 13.0 or higher

Preparing Cordova project

By now you should have a folder with config.xml in it (and possibly some other files), and a www subfolder.

Open a command prompt with the current directory set to the location config.xml is in. Use the following command to prepare a full Cordova project based on the exported files:

cordova prepare

This may take a while as it fetches dependencies and configures the project.

Once it's done, if this is your first build, you might want to check you have the right software installed. You can do this with:

cordova requirements

Cordova will then tell you if it has everything it needs. If anything is missing you might have to go back and install something else. Cordova should provide instructions if so.

Building apps

To build the app, simply use:

cordova build