Install KXBuild
One command sets up an iOS development environment on Windows, Linux or macOS. Need help? Email admin@kxbuild.net.
RecommendedInstall with WSL
Install WSL, then restart your computer
PS> wsl --installInstall 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.
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 | bashInstalls to ~/kxbuild inside Ubuntu by default.
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.
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 doctorInstall directly on Windows
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 | iexInstalls to %USERPROFILE%\kxbuild by default.
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.
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 doctorInstall
$ curl -fsSL https://api.kxbuild.net/install.sh | bashInstalls to ~/kxbuild by default. The installer asks first, so you can enter another absolute path such as /opt/kxbuild.
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.
Verify the installation
Open a new terminal and run the command below. It installs the SDK you put in place and checks your setup.
$ kxbuild doctorOptional 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
WindowsTo 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
WindowsNeeded when the project has .metal shaders. The download requires an Apple Account. Once installed, just build and KXBuild finds it.
Xcode installer (.xip)
Windows · LinuxYou 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
kxbuild command line
Reads Xcode projects and Swift packages directly and builds an .ipa in one command. It fits into CI pipelines too.
Certificates and signing
Builds work without a certificate, but they will not install on a device. Put your .p12 and .mobileprovision in the certificate folder and every build is signed automatically.