Get Started: iOS App Development on Windows in VS Code
Use the KXBuild VS Code extension to go through the whole iOS workflow on Windows. Create a project, add your certificate, debug on your iPhone and build a Release .ipa. Linux and macOS work the same way.
Last updated
iOS app development on Windows takes VS Code, the KXBuild extension, an iPhone and the certificate from your Apple Developer account. The path below has six steps: install the extension and toolchain, create a project from a template, put your .p12 certificate and provisioning profile in a keychain folder, connect the iPhone over USB, press F5 to debug on the device, then switch to Release and build an .ipa for the App Store. The steps are identical on Windows 10 / 11, Linux and macOS.
1. How do I install the KXBuild extension on Windows?
Install the kxbuild toolchain from the install page. Then search for KXBuild in the VS Code Extensions view (Ctrl+Shift+X) and install it. A KXBuild icon appears in the Activity Bar. If you develop in WSL, also install the WSL extension. For other ways to install, see install the VS Code iOS extension.
2. How do I create my first iOS app project?
Run KXBuild: New Project from the Command Palette (Ctrl+Shift+P), pick "iOS App (SwiftUI)" from the 11 templates, enter a project name and bundle ID, and choose a folder. Open that folder and the KXBuild view shows the project and its targets. To use an existing project, just open its folder. See Create, open and import projects.
3. Where do my certificate and profile go for iOS development on Windows?
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. For certificate types and common signing errors, see how to sign iOS apps on Windows.
development.p12=1234564. What do I need to do the first time I connect my iPhone?
Connect the iPhone to your computer over USB and click it under the Device node in the KXBuild view to make it the active device. The first time you connect a given phone, you need to do the four things below. After that, you can skip them.
- Install the driver. When the Device node says "click to set up", click it and approve the admin prompt.
- 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.
- Wait for device symbols. They download automatically before your first debug session. It's a few GB and takes about ten minutes, but only once.
5. How do I debug on my iPhone?
Set a breakpoint and press F5. KXBuild builds, signs, installs and launches the app, then attaches the debugger, with no launch.json to write. When the breakpoint hits, VS Code switches to the debug view. App output goes to Output > KXBuild Console, and build errors show up in the Problems panel. KXBuild doesn't support the iOS Simulator; apps run and debug on an iPhone connected over USB.
6. How do I build a Release .ipa for the App Store?
Add an Apple Distribution certificate and an App Store provisioning profile to the keychain folder. Then run KXBuild: Build for App Store (.ipa) from the Command Palette or the project's context menu. The build writes build\MyApp.ipa in the project folder.
Upload the .ipa to App Store Connect with kxstore build upload build\MyApp.ipa, then go through TestFlight and App Review. See publish to the App Store from Windows. Once these six steps work, your setup for iOS app development on Windows is complete, and day-to-day work is just step 5 again.
Next steps
Project Settings Editor
No need to open project.pbxproj. Change identity, deployment, signing and version on the General page, and view and edit Build Settings by Basic, Customized, All and by level, with resolved values shown live.
Asset Catalog Editor
Create image sets, color sets, symbol sets and app icons, generate every icon size from one 1024 image, set appearance, device and scale for image sets, and use the built-in validation and compile check.