Build React Native iOS Apps on Windows: .ipa and Debugging
Build, install and debug the native side on Windows while Metro runs the JavaScript as usual.
Last updated
To build React Native iOS apps on Windows, KXBuild builds and installs the native project under ios/: Metro runs the JS as usual, native code gets breakpoints in VS Code, and a Release build bundles the JS into the app and writes an .ipa in the ios folder. Community CLI build scripts that call xcodebuild work unchanged; see xcodebuild and xcrun on Windows. Install Node.js yourself, and CocoaPods comes with the toolchain.
How do I set up React Native on Windows and open a project?
1. Set up React Native
Install Node.js as described on the React Native website. Open a new terminal and check that this prints a version.
> node --version2. Create a project
If you don't have a project yet, create one.
Run KXBuild: New Project from the Command Palette and pick the React Native App template.
To use an existing project, open its root folder in VS Code with File > Open Folder…, or drag the folder into VS Code.
Keep the parent path short, because the dependency folders nest deeply.
> kxbuild project create -t react_native_app -n rnhello -o D:\work3. Run doctor
Do this first whenever you open a project for the first time. Doctor checks your React Native setup and prepares the iOS project.
In the title bar of the KXBuild view, open the ··· menu and run Doctor (fix environment).
> kxbuild doctor D:\work\rnhelloAfter doctor, install the native dependencies in the ios folder. See CocoaPods. If Pods or Hermes errors come up, run it again first; see React Native New Architecture iOS problems.
ios> pod installHow do I debug a React Native app on an iPhone?
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
Select your device and press F5. KXBuild starts Metro for you, and the app loads its JS over the USB cable. Debug native breakpoints in VS Code and JS breakpoints in the Metro / Hermes debugger. The two work independently.
kxbuild run builds, installs and launches the app in one command. KXBuild starts Metro for you, and the app loads its JS over the USB cable. Debug JS breakpoints in the Metro / Hermes debugger.
> kxbuild run .\ios\rnhello.xcworkspaceBefore you connect a phone for the first time, install and open Apple Devices from the Microsoft Store to get the USB driver on Windows. On iOS 16 and later, turn on Developer Mode in Settings > Privacy & Security and let the phone restart. See connect an iPhone to Windows for the full steps.
How do I build a React Native iOS .ipa on Windows?
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 publish to the App Store from Windows.
Run KXBuild: Build for App Store (.ipa) from the Command Palette or the project's context menu.
> kxbuild build .\ios\rnhello.xcworkspace -c Release --export app-storeAn App Store .ipa must be signed with an Apple Distribution certificate. Put your own .p12 certificate and .mobileprovision profile in a keychain/ folder and every build signs automatically; see sign iOS apps on Windows. Upload with kxstore (kxstore build upload, on Windows, Linux or macOS), then handle TestFlight and review on App Store Connect. That way you build React Native iOS apps on Windows, debug them on a real iPhone and submit them from one computer. For Expo projects, see build Expo iOS apps locally on Windows.
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 kxstore (or Transporter on a Mac), 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.