Publish your game to Android and iOS manually using Cordova

From GDevelop, you can publish your games to Android and iOS. In the export dialog, you can choose the first Android and iOS option, which will use GDevelop online services to automatically build your game for Android and iOS.

If you want more control or have special needs, you can also choose iOS and Android (manual) option. This option exports your game as a Cordova project. Cordova, also known as PhoneGap, is a technology allowing HTML5 games and apps to run on Android and iOS and be packaged as apps, and then distributed on the App Store or Play Store.

This option requires you to install advanced developer tools and some knowledge of how to use them. It's a good idea to read some external documentation as you discover them.

Choose a folder

First, choose a folder where the game will be exported. It is recommended to choose an empty folder, at least for the first time, to avoid losing any file that could be overwritten by the export.

Launch export

You can then click on Export. The game will be exported to a Cordova project.

You can then use Cordova or PhoneGap Build to package your game as an Android or iOS app.

Compiling for Android or iOS with Cordova

Building for Android or iOS with Cordova requires you to install specific tools on your system.

  • For iOS, you need macOS with XCode installed.
  • For Android, you need to install Android Studio with the Android SDK and Java.

To be able to build the exported Cordova project, you also need to have Node.js installed on your system. Finally, you need to install Cordova by typing on the command prompt or terminal:

npm install -g cordova 

After that, navigate to your Cordova project's directory and type this on the command prompt or terminal:

  • cordova platform add ios if you want to export your game to iOS.
  • cordova platform add android if you want to export your game to Android.

This will create new folders on your project's directory:

  • platforms/ios: compiled iOS project of your game.
  • platforms/android: compiled android project of your game, which can be imported on Android Studio or other IDEs.

Once you have specified what platform you want your game to be exported to, you can now build the Cordova project. Type on the command prompt or terminal either:

  • cordova build: this will build your project to all the platforms you have.
  • cordova build ios: this will only build your project into an iOS executable, that can be used to install your game on iOS devices.
  • cordova build android: this will only build your project into an Android executable (apk), that can be used to install your game on Android devices.

Testing on iOS simulators

  • List iOS simulators installed on your Mac with cordova emulate ios --list.
  • You can run the app on a specific simulator using target: cordova run ios --target="iPhone-8".

Export to other platforms (Web, Windows, macOS, Linux)

See the other export options to learn how to publish your game on other platforms!