Skip to main content
On this page

Get started with KXBuild

Go through the whole iOS workflow on Windows using only the terminal. Create a project, add your certificate, install and debug on your iPhone and build a Release .ipa. Linux and macOS work the same way.

1

Install

Run the command for your OS and follow the prompts.

Windows · PowerShell

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

Linux / macOS · Terminal

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

When it finishes, open a new terminal and run kxbuild doctor. You're set when every check passes. For other ways to install, see the install page.

2

Create a project

Create one from the SwiftUI template. Pass a project name, a bundle ID and the parent folder.

> kxbuild project create -t app_swiftui -n MyApp -b com.example.myapp -o D:\projects

The project lands in D:\projects\MyApp. Run kxbuild project templates to list every template, or see Project templates. To use an existing project, pass its path instead.

3

Add your certificate

Put your .p12 certificate and .mobileprovision profile in a keychain folder, either in the project root or under KXBUILD_HOME. In the same folder, add a password.properties file with one file=password line per certificate. The profile must be a development profile that includes this iPhone's UDID. See Certificates and signing.

development.p12=123456
4

Connect your iPhone

Connect the iPhone to your computer and check that it shows up.

> kxdevice device list

The first time, you need to do three things.

  • Install the driver. If the Apple device drivers are missing, the command above tells you to run kxdevice doctor. Install Apple Devices from the Microsoft Store, open it, and check that it shows your iPhone.
  • Trust the computer. Tap Trust when the iPhone asks.
  • Turn on Developer Mode. On the iPhone, go to Settings > Privacy & Security > Developer Mode, turn it on and restart.
5

Build and install on the device

Add --install to the build command to build, sign and install in one step. It uses the Debug configuration by default. Then open the app on the iPhone.

> kxbuild build D:\projects\MyApp\MyApp.xcodeproj --install
6

Build a Release .ipa

Add an Apple Distribution certificate and an App Store provisioning profile to the keychain folder, then build with the Release configuration.

> kxbuild build D:\projects\MyApp\MyApp.xcodeproj -c Release

The build writes build\MyApp.ipa in the project folder. Upload it to App Store Connect with Transporter or Appuploader. See Release and App Store submission.

Next steps