Develop Objective-C iOS apps on Windows
Open your existing Xcode project and build. No changes needed.
Build Objective-C iOS projects on Windows, install them on your iPhone and debug with breakpoints. Your .xcodeproj and .xcworkspace work as is. KXBuild reads build settings, target dependencies and compiler flags by Xcode's rules and builds an app you can install on your phone. Mixed Objective-C and Swift is supported. For projects that use CocoaPods, see CocoaPods.
Steps
Create a project
To use an existing project, open its folder in VS Code with File > Open Folder…, or drag the folder into VS Code. Otherwise, create one.
Use either of these
-
VS Code extension
Run KXBuild: New Project from the Command Palette and pick the "iOS App (Objective-C, UIKit)" template, or "iOS App (Objective-C + Swift)" for a mixed project.
-
Command line
> kxbuild project create -t app_objc -n MyApp -o D:\projects
Run doctor
Doctor checks your build environment and fixes anything missing.
Use either of these
-
VS Code extension
In the title bar of the KXBuild view, open the ··· menu and run Doctor (fix environment).
-
Command line
> kxbuild doctor .\MyApp.xcodeproj
Write code
Open a .m or .h file and you get completion, go to definition and error checking, including for system framework APIs. If completion misbehaves, see Code completion and indexing.
Debug
Connect your iPhone over USB, select it in the KXBuild view and press F5. KXBuild builds, installs and stops at your breakpoints. Breakpoints work in both Objective-C and Swift code.
Release
Build with the Release configuration to get build\MyApp.ipa in the project folder. To upload it to App Store Connect, see Release and App Store submission.
Use either of these
-
VS Code extension
Switch the configuration to Release in the Build configuration node of the KXBuild view, then run KXBuild: Build from the Command Palette.
-
Command line
Run the command for your project type.
.xcodeproj project
> kxbuild build .\MyApp.xcodeproj -c Release.xcworkspace workspace
> kxbuild build .\MyApp.xcworkspace -c Release
Next steps
Build and configure
Debug versus Release, choosing a scheme, target and configuration, overriding build settings, where build products go, when you get an .ipa and when Swift package dependencies resolve.
Release and App Store submission
Build Release with a Distribution certificate to get an .ipa, upload it to App Store Connect with Transporter or Appuploader, then go through TestFlight and App Review. Ad Hoc and enterprise distribution work the same way.
Don't see your framework?
kxbuild is a general-purpose build toolchain, so if your framework produces an Xcode project, KXBuild can build it. The list above covers common cases only. Tell us about your setup.