Skip to content
xcross
Documentation menu

Compose Multiplatform

Build, install, run and debug Compose Multiplatform (KMP) iOS apps from Windows or Linux with xcross compose.

xcross compose builds Kotlin Multiplatform iOS apps with the same SDK, compilers and signing as Flutter. No Mac, no Xcode.

Kotlin sourcesGradle → klib
Frameworkkonanc (cached)
RunnerObjC or SwiftUI host
Sign + installyour Apple ID
Launchattached via CoreDevice

Get started

  1. 1
    Host setup (once)
    $xcross setup
  2. 2
    Kotlin/Native toolchain (once)
    $xcross compose setup
    Add --check to verify without installing, --force to refresh the cache.
  3. 3
    Build
    $xcross compose build
    From your Gradle project root. --ipa packages an .ipa.
  4. 4
    Run on the device
    $xcross compose run --watch
    Needs xcross tunnel running. See Quick start.

What gets built

Project entry
Output
compose run
Kotlin ComposeUIViewController
.app
SwiftUI @main host
.app
Framework-only KMP module
.framework

The restart loop

Kotlin/Native compiles ahead of time, so there is no in-place hot reload. --watch gives you the next best thing:

rRebuild if .kt / .kts / .toml / .properties changed, then reinstall + relaunch
qQuit

An unchanged r leaves the app alone. Unchanged inputs skip konanc entirely:

Full rebuild~145 s
Cached rebuild~12 s

Hosts

Host
Compose builds
Windows x64
Linux x64
Windows ARM64
Kotlin/Native ships x64 Windows compilers only
Linux arm64
blocked by upstream Kotlin/Native artifacts

Check your machine and project with xcross compose doctor. It lists every Compose requirement on its own row, and treats a missing Kotlin/Native download as a warning since the first build fetches it.

NoteCompose apps run natively attached for supervision and logs. There is no Kotlin source-level DAP yet, so IDE breakpoints are Flutter-only for now.

Flags

CommandUseful flags
compose build--configuration debug|release, --bundle-id, --app-name, --ipa, -v
compose run-d / -u device, --usb, --wifi, --bundle-id, -a app args, --watch, -v
compose setup--check, --force, -v
compose doctorread-only readiness check
compose cleanclear this project’s xcross build output and Kotlin/Native caches

The App ID choice (original or XCR- prefixed) made on the first device run is saved in xcross_project.yaml. See App ID on first device run.

Full list: CLI reference.

TipCustom JDK or Kotlin/Native cache location? Set roots.javaHome and roots.konanData in Configuration.

ESC