Skip to main content

Build Expo iOS apps locally on Windows

Prebuild generates ios/ automatically. Build and install the native side on Windows while Metro runs the JavaScript as usual.

Build the iOS side of an Expo project locally on Windows and debug it on your iPhone, with no EAS Build. If the project has no ios/ folder, doctor generates it. Run Metro for the JS as usual, and set breakpoints in native code.

Steps

1

Set up Expo

Install Node.js as described on the Expo website. Open a new terminal and check that this prints a version.

> node --version
2

Create a project

To use an existing project, open its root 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 "Expo App" template.

  • Command line

    Keep the parent path short, because the dependency folders nest deeply.

    > kxbuild project create -t expo_app -n expohello -o D:\work
3

Run doctor

Do this first whenever you open a project for the first time. Doctor checks your Expo setup, then generates and prepares the iOS project.

Use either of these

After doctor, install the native dependencies in the ios folder. See CocoaPods.

ios> pod install
4

Write code

Write JS and TypeScript in VS Code as usual, and Metro reloads when you save. KXBuild provides completion and go to definition for the native code under ios/.

5

Debug

In a second terminal, run npx expo start in the project folder. Then select your device and press F5. Debug native breakpoints in VS Code and JS breakpoints in the Metro / Hermes debugger. The two work independently.

6

Release

Build with the Release configuration. The JS is bundled into the app, and the .ipa is written to the ios 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
    > kxbuild build .\ios\expohello.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.