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.
konanc (cached)Get started
- 1Host setup (once)$
xcross setup - 2Kotlin/Native toolchain (once)$Add
xcross compose setup--checkto verify without installing,--forceto refresh the cache. - 3Build$From your Gradle project root.
xcross compose build--ipapackages an.ipa. - 4Run on the device$Needs
xcross compose run --watchxcross tunnelrunning. See Quick start.
What gets built
compose runComposeUIViewController.app@main host.app.frameworkThe restart loop
Kotlin/Native compiles ahead of time, so there is no in-place hot reload. --watch gives you the next best thing:
.kt / .kts / .toml / .properties changed, then reinstall + relaunchAn unchanged r leaves the app alone. Unchanged inputs skip konanc entirely:
Hosts
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
| Command | Useful 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 doctor | read-only readiness check |
compose clean | clear 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.