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
Set up Expo
Install Node.js as described on the Expo website. Open a new terminal and check that this prints a version.
> node --versionCreate 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
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
-
VS Code extension
In the title bar of the KXBuild view, open the ··· menu and run Doctor (fix environment).
-
Command line
> kxbuild doctor D:\work\expohello
After doctor, install the native dependencies in the ios folder. See CocoaPods.
ios> pod installWrite 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/.
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.
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
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.