Skip to content
xcross
Documentation menu

Darwin SDK

How xcross turns an Xcode.xip archive into a host-neutral Darwin Swift SDK, without installing Xcode or macOS.

Compiling for iOS needs Apple’s iOS sysroot and frameworks. xcross gets them from a real Xcode release archive, but it never installs or runs Xcode - it extracts only the files it needs into a private SDK bundle that Swift and LLVM can target directly from Windows or Linux.

Why an Xcode.xip is needed

The iOS sysroot, system frameworks, and Swift compatibility resources are only distributed inside Xcode. xcross does not reimplement or mirror these files - it reads them out of the official archive you download from Apple. There is no way around providing an Xcode.xip.

This step runs once per machine. After xcross sdk install finishes, the resulting SDK bundle is reused for every xcross flutter run and xcross flutter build until you reinstall it.

Downloading Xcode.xip

Get a complete Xcode.xip from xcodereleases.com. Downloading it requires an Apple ID, but not a paid developer account.

NoteThe archive is only used as SDK input. Neither Xcode nor macOS is ever installed or executed - xcross reads the archive’s contents directly.

Installing the SDK

Run xcross sdk install <path-to-Xcode.xip> after xcross setup. Extraction takes a while, so run it somewhere you can leave unattended.

Windows

xcross sdk install C:\Downloads\Xcode.xip

Linux

xcross sdk install ~/Downloads/Xcode.xip

The command produces a host-neutral Darwin Swift SDK bundle - an iOS sysroot plus the frameworks Flutter and your plugins link against - named xcross-darwin.artifactbundle and stored under xcross’s config directory:

HostBundle location
Windows%APPDATA%\xcross\swift-sdks\xcross-darwin.artifactbundle
Linux~/.config/xcross/swift-sdks/xcross-darwin.artifactbundle

NoteOn Linux the config root follows $XDG_CONFIG_HOME when it is set, falling back to ~/.config.

Re-running xcross sdk install replaces any previously installed SDK, which is the supported way to move to a newer Xcode release.

How extraction works

Xcode.xip is an Apple .xip archive: an xar container wrapping a pbzx-compressed cpio payload. xcross includes its own pure-Dart readers for all three formats, so it can unpack the archive without calling into Xcode, xip, or any macOS-only tool. This is what makes the whole pipeline work on Windows and Linux in the first place.

Licensing

ImportantThe SDK bundle contains Apple’s own SDK and framework files, extracted under the terms you accepted to download Xcode. Do not redistribute the extracted SDK.

Next steps

ESC