Welcome back

Opening shared build

Preparing your Mach workspace…

Preparing your secure download…

Mach
Dashboard
All guides
React Native guide
July 31, 2026 · 6 min read

How to Add Mach to a React Native CLI Project

Connect a bare React Native app to Mach while keeping the native iOS and Android projects you already maintain.
What you will finish with
A linked Mach project, a framework-specific mach.config.json, and an exact command sequence for your first release workflow.

Before you start

This guide is for a vanilla React Native, or React Native CLI, project with committed ios and android folders. Mach builds those native projects directly. It does not run Expo prebuild, replace your native folders, or inject Expo-only build settings.
You need Node.js, a Mach account, a working Android Gradle project, and an iOS workspace or Xcode project for iOS builds. Keep the bundle identifier and package name aligned with the apps you already maintain.
Use framework: react-native when your repository owns native configuration.
Set ios.iosScheme if the iOS project has more than one buildable scheme.

1. Install Mach and sign in

Install the Mach CLI once, then authenticate it with your Mach account.
bash
npm install -g @radhya/mach mach login

2. Link the React Native project

Run mach link from the repository root and select the corresponding Mach project. It creates or updates mach.config.json with the project identity while leaving your existing native code in place.
bash
cd my-react-native-app mach link
Native folders remain yours
Mach uses the iOS and Android projects committed to the repository. Keep your CocoaPods, Gradle plugins, Firebase setup, and other native customisations exactly where they already live.

3. Declare the React Native pipeline

Set the framework explicitly and keep the identifiers and build counters in mach.config.json. This prevents a dependency change in package.json from changing how a production build behaves.
mach.config.json
{ "framework": "react-native", "appDirectory": ".", "ios": { "bundleIdentifier": "com.example.app", "iosScheme": "MyApp", "buildNumber": "auto" }, "android": { "package": "com.example.app", "versionCode": "auto" }, "build": { "development": { "distribution": "development", "environment": "development" }, "production": { "distribution": "store" } } }
Keep auto-versioning predictable
Use "auto" for Android versionCode and iOS buildNumber to let Mach allocate the next Dashboard counter. Use an explicit value only when you intentionally need to seed or control a release train.

4. Review the resolved configuration

Check the profile that will build before you run it. This confirms the target identifiers, distribution mode, and versioning values resolved from the project config.
bash
mach config --profile production

5. Run your first build

Mach installs dependencies, runs CocoaPods for iOS when needed, builds your existing Xcode or Gradle project, then uploads the artifact to the dashboard.
bash
mach build --platform ios --profile production mach build --platform android --profile production

Optional: prepare OTA updates

Mach OTA is available for bare React Native too. The setup flow can add the Expo Modules and expo-updates pieces required by the open-source runtime while keeping update hosting and release control in Mach. Review and commit the generated native changes before building the OTA-enabled binary.
bash
mach ota setup mach ota verify
Keep going
Configure credentials
mach credentials
Save the signing material required for the profile and identifiers you will build.
Add deep links
mach deeplink setup
Generate the platform configuration and association files for your web domain.
Build and release with less ceremony.
Guides for Flutter, React Native, and Expo teams that want a clear path from project setup to shipment.
All guides
Start free