Skip to main content

Install KXBuild

One command sets up an iOS development environment on Windows, Linux or macOS. Need help? Email admin@kxbuild.net.

RecommendedInstall with WSL

1

Install WSL, then restart your computer

PS> wsl --install
2

Install Ubuntu

PS> wsl --install --web-download Ubuntu --location D:\wslubuntu

--location sets where the WSL distribution is installed. Run wsl --list --online to see the available versions.

3

Install KXBuild

Open an Ubuntu terminal (run wsl in PowerShell) and run the command below. The installer lets you choose the install location.

$ curl -fsSL https://api.kxbuild.net/install.sh | bash

Installs to ~/kxbuild inside Ubuntu by default.

4

Set up the iOS SDK

Download the two iOS SDK archives, iPhoneOS.platform.zip and toolchain.zip, and put them into KXBUILD_HOME/sharedcomponents/. Get them from a source such as ios-sdk, or extract them from Xcode with a tool such as ios-sdk-extractor. See the iOS SDK guide.

5

Verify the installation

Open a new Ubuntu terminal (run wsl in PowerShell) and run the command below. It installs the SDK you put in place and checks your setup.

$ kxbuild doctor

Install directly on Windows

1

Install KXBuild

Open PowerShell and run the command below. It installs Swift, the Visual Studio Build Tools and other dependencies, which can take anywhere from a few minutes to half an hour. Follow the prompts to choose the install location and approve admin access.

PS> irm https://api.kxbuild.net/install.ps1 | iex

Installs to %USERPROFILE%\kxbuild by default.

2

Set up the iOS SDK

Download the two iOS SDK archives, iPhoneOS.platform.zip and toolchain.zip, and put them into KXBUILD_HOME/sharedcomponents/. Get them from a source such as ios-sdk, or extract them from Xcode with a tool such as ios-sdk-extractor. See the iOS SDK guide.

3

Verify the installation

Open a new PowerShell window so the updated PATH takes effect, then run the command below. It installs the SDK you put in place and checks your setup.

PS> kxbuild doctor
This option installs the Visual Studio C++ Build Tools, which take 10–20 GB of disk space. Windows also limits paths to 260 characters by default, so builds can fail on long paths. We recommend the WSL option.

Optional downloads

These come from Apple or the Microsoft Store, so the installer doesn't set them up. Get them when you need them.

Apple Devices

Windows

To talk to an iPhone, Windows needs Apple Devices from the Microsoft Store. Install it, open it, wait for the driver installation to finish, and check that your iPhone shows up there before using KXBuild.

Metal Developer Tools

Windows

Needed when the project has .metal shaders. The download requires an Apple Account. Once installed, just build and KXBuild finds it.

Xcode installer (.xip)

Windows · Linux

You can also use an Xcode installer for the SDK: put the .xip into sharedcomponents and doctor extracts the SDK from it. The download requires an Apple Account.

Next steps