Skip to main content
On this page

iOS SDK

Download the two archives iPhoneOS.platform.zip and toolchain.zip, put them in sharedcomponents and run kxbuild doctor.

Building for iOS needs the iOS SDK, which is just two archives: iPhoneOS.platform.zip and toolchain.zip. Put them in the sharedcomponents folder and run kxbuild doctor, and the SDK is installed.

1. Download the two archives

On ios-sdk, open the folder that matches your Swift version (run swift --version to see it) and download iPhoneOS.platform.zip and toolchain.zip.

2. Put them in sharedcomponents

Copy both archives into KXBUILD_HOME/sharedcomponents/. Default locations:

  • Windows: %USERPROFILE%\kxbuild\sharedcomponents\
  • WSL, Linux, macOS: ~/kxbuild/sharedcomponents/

If you chose another folder during installation, see Folders and environment variables.

3. Run doctor

> kxbuild doctor

As a convenience, when sharedcomponents has no SDK, doctor by default looks online for a matching SDK and installs it.

Using another SDK version

The two archives in each ios-sdk folder belong together: when you switch versions, switch both and don't mix folders. Then run doctor; on Windows, if doctor asks for another Swift version, install it from swift.org and run doctor again.

You can also pack the archives yourself: ios-sdk-extractor extracts them from an Xcode installer, and they are used the same way.

Next steps