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.
Install
Run the command for your OS and follow the prompts.
Windows · PowerShell
PS> irm https://www.kxbuild.net/install.ps1 | iexLinux / macOS · Terminal
$ curl -fsSL https://www.kxbuild.net/install.sh | bashWhen 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.
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.
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=123456Connect your iPhone
Connect the iPhone to your computer and check that it shows up.
> kxdevice device listThe 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.
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 --installBuild 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
kxbuild command reference
Every kxbuild subcommand and option, including doctor, build, resolve, project, update and version.
kxdevice command reference
Every kxdevice subcommand and option, grouped into devices and pairing, installing and apps, launching and screenshots, debugging and symbols, logs and crashes, files and sandboxes, packet capture and location, backup and diagnostics, and the web UI.