---
title: "Export for the web, Android and iOS"
url: https://recursiveai.org/onegame/cookbook/export-web-android-ios/
description: "What the web, Android and iOS exports need at onegame 1.2.0: an engine checkout for all three, plus the Android SDK or a Mac with Xcode, and what each…"
version: "1.2.0"
---

# Export for the web, Android and iOS

What the web, Android and iOS exports need at onegame 1.2.0: an engine checkout for all three, plus the Android SDK or a Mac with Xcode, and what each export produces.

**At 1.2.0, the web, Android and iOS exports need an engine checkout.** A game made from the NuGet packages exports for Linux, Windows and macOS, and its dedicated server for Linux. The web export reads engine sources (its page and script files), so it needs a game created against a checkout; Play Billing in an Android build and plugin servers do too. The Android and iOS entry files ship in the SDK package, but those two exports have only been run from a checkout.

## What a game from the packages gets

From the apple tree in [Getting started](https://recursiveai.org/onegame/docs/getting-started/), made with `onegame new` and the packages only:

```shell
onegame export --target web
```

```text
error: The web export needs the engine sources (its page and script files), so it runs for a game that sets OneGameRoot to an engine checkout (onegame new --engine <checkout>). A game on the RecursiveAI.OneGame.Sdk package cannot export for the web yet.
```

That exits 3. Android and iOS stop earlier on this Linux machine, at their toolchains, each with exit 4:

```shell
onegame export --target android
```

```text
error: The Android SDK was not found. Set ANDROID_HOME (or pass --sdk <folder>) to a folder with build-tools, platforms, platform-tools and an ndk folder; the command-line tools' sdkmanager installs them.
```

```shell
onegame export --target ios-simulator
```

```text
error: Exporting for iOS links with Xcode's toolchain and the iOS SDK, so it needs a Mac with Xcode (xcode-select -p must point at it).
```

## A game against an engine checkout

Clone the engine at the release tag, build it, and create the game against it:

```shell
git clone --branch v1.2.0 https://github.com/recursive-ai-oss/onegame
cd onegame
dotnet build OneGame.slnx
dotnet run --project src/OneGame.Cli -- new mygame --dir ../mygame --engine .
```

Such a game references the engine’s projects instead of packages. Setting `ONEGAME_ROOT` to the checkout does the same for `onegame new`. These steps are from the engine’s README and weren’t run for this page.

## What each export makes

| Target | Command | Needs | Result |
|---|---|---|---|
| Web | `onegame export --target web` | a checkout | a folder any static server can host: .NET on WebAssembly, WebGPU, the page and its scripts. Serve `.wasm` as `application/wasm`. |
| Android | `onegame export --target android [--abi arm64-v8a,x86_64] [--dev]` | a checkout, the Android SDK and NDK | a debug-signed APK holding a NativeAOT shared library, no Java |
| iOS Simulator | `onegame export --target ios-simulator [--dev]` | a checkout, a Mac with Xcode | an ad-hoc signed `.app` for the Simulator |
| iOS device | `onegame export --target ios` | a checkout, a Mac with Xcode | an unsigned arm64 `.app`, which the owner of an Apple Developer account signs; the steps are printed as `signingNeeds` |

## Good to know

- Drawing from files is desktop only at 1.2.0. The engine’s [assets notes](https://github.com/recursive-ai-oss/onegame/blob/v1.2.0/docs/interfaces/assets.md) say web, Android and iOS builds keep art inside the program, where the default file source finds nothing, and a missing file throws. So the scaffold’s ship, drawn from `art/ship.png`, needs an asset source of your own on those targets. This wasn’t run for this page.
- A page needs a browser with WebGPU: Chrome and Edge 113 and later. Safari and Firefox aren’t tested. Sound starts after the first click or key press.
- `onegame web test` runs a game’s scenarios in headless Chrome (`ONEGAME_CHROME` names the browser), and `onegame android test` and `onegame ios test` run them on an emulator, a device or the Simulator. The engine’s own runs are in [Checking on devices](https://recursiveai.org/onegame/docs/devices/).
- A game that connects to servers from Android sets `<AndroidInternet>true</AndroidInternet>` in its project file.
- To branch on the platform, ask `OneGame.Platform.RunningOn` (`Android`, `IOS`, `Browser`, `Phone`, `Mobile`, `Desktop`), new in 1.1.2. `OperatingSystem.IsAndroid()` is false in a NativeAOT Android build.
- A scenario capture compares against `name-mobile.png` beside `name.png` on a phone or in a page, when that file exists.

Every target is in [Exporting](https://recursiveai.org/onegame/docs/exporting/).
