Skip to main content

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

1

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
2

Run doctor

Doctor checks your build environment and fixes anything missing.

Use either of these

3

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.

4

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.

5

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

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.