Software Crafting

Enterprise Mobile CI/CD: Architecting Secure Over-The-Air (OTA) Hotfixes for React Native with Expo EAS

BBadal SinghMobile Development9 min read05 Apr 2026Updated 2026-11-07
A smartphone on a dark network map with a shield icon above it and teal and purple data streams flowing in, surrounded by smaller shields and nodes

TL;DR: Ship JavaScript-only hotfixes to React Native users without waiting for App Store review by using Over-The-Air (OTA) updates. With Expo EAS Update you publish a new JavaScript bundle (for example, a fix for an undefined-property crash) to a channel, runtime versions keep it away from incompatible native builds, and code signing lets the app verify the update came from you.

Key Takeaways

  • Use Over-The-Air (OTA) updates to ship critical JavaScript fixes without waiting for App Store and Google Play review.
  • Isolate your app architecture into Native Code (requires store review) and JavaScript Bundles (eligible for OTA updates).
  • Push emergency JavaScript patches, such as fixing undefined object crashes with optional chaining (user?.name?.first), directly to users' devices.
  • Install eas-cli, link the project with eas init, and run eas update:configure to add runtimeVersion, updates.url and build channels.
  • Sign updates with a key generated by npx expo-updates codesigning:generate; the private key stays with you and is never uploaded to Expo.

It is 2:00 PM on a Friday. You just launched a major update for your company’s mobile app, and thousands of users are downloading it. Suddenly, your error monitoring dashboard lights up in red. A tiny typo in your JavaScript code is causing the app to crash every time a user navigates to the checkout screen.

You isolate the bug immediately, and it takes exactly two minutes to fix the code. But now you face a massive bottleneck: to get this fix to your users, you must submit a new version to the Apple App Store and Google Play Store.

Apple states that it reviews 50% of submissions in under 24 hours and 90% in under 48 hours, and you can request an expedited review for a critical bug fix, but none of that is guaranteed. Until the fix is approved and users actually install the new version, the crash keeps happening, and for a checkout or logistics flow that means lost orders and bad reviews.

This is the harsh reality of traditional mobile app development. The release cycle is largely out of your control.

For a JavaScript-only fix, there is a faster path: publish the fixed JavaScript bundle directly to installed apps, much like deploying a hotfix to a website.

This is where Over-The-Air (OTA) updates come in. In this guide, we will break down exactly what OTA updates are, how they work in React Native, and how to set up a secure, automated pipeline using Expo EAS (Expo Application Services) to ship those fixes quickly.

What is an Over-The-Air (OTA) Update?

If you are new to mobile development, you might wonder how it is possible, or even allowed, to update an app outside Apple and Google's review processes. To understand this, we have to look at how a React Native app is constructed.

React Native apps are fundamentally composed of two distinct layers:

  1. Native Code: This is the core iOS (Swift/Objective-C) and Android (Kotlin/Java) compilation. It manages device-level capabilities like the camera, Bluetooth, file system, and push notifications.
  2. JavaScript Bundle: This is the code you write, encompassing your React components, business logic, state management, and API integrations.

Think of your app like a physical house. The Native Code is the foundation, walls, and plumbing. The JavaScript represents the furniture, paint, and interior decor.

Apple and Google's guidelines dictate that if you alter the foundation (Native Code), you must undergo a formal inspection (App Store Review). However, if you are only rearranging the furniture (JavaScript), you are generally permitted to update it without undergoing another review, provided the update doesn't change the app's primary purpose.

An OTA update is a mechanism that lets your app check a remote server, download a new JavaScript bundle in the background, and switch to it on the next launch, without the user opening the App Store.

Here is a simplified example of code that qualifies for an OTA update:

// BEFORE: A bug causing a crash because "user.name" is undefined
export default function CheckoutScreen({ user }) {
  return (
    <View>
      <Text>Welcome to checkout, {user.name.first}!</Text>
    </View>
  );
}

// AFTER: Safely handling the undefined data using optional chaining (Fixed via OTA!)
export default function CheckoutScreen({ user }) {
  return (
    <View>
      <Text>Welcome to checkout, {user?.name?.first || 'Guest'}!</Text>
    </View>
  );
}

Because this is purely a change to the JavaScript logic, it can ship as an OTA update.

Setting Up Expo EAS for Your Project

To distribute these JavaScript updates, we need a secure hosting environment and an integrated client-side system to retrieve them. We will use EAS Update, part of Expo Application Services (EAS).

What is Expo? Expo is a comprehensive framework and platform built around React Native. EAS is their cloud infrastructure for building, deploying, and updating apps. You do not need to use "Expo Go" to use EAS. EAS Update also works in "bare" React Native apps once the expo package and expo-updates are installed.

First, install the EAS Command Line Interface (CLI) to interact with Expo's servers. Open your terminal and run:

# Install the EAS CLI globally on your machine
npm install -g eas-cli

# Log in to your Expo account (create one at expo.dev if needed)
eas login

Next, navigate to the root directory of your React Native project and initialize EAS:

# Initialize EAS in your project
eas init

This command prompts you to link your project to your Expo account and generates an eas.json file at your project root.

Configuring EAS Update

With our project linked, we must install the client-side library that enables the app to fetch and apply updates.

Run the following commands:

# Install the expo-updates library
npx expo install expo-updates

# Configure your project to integrate EAS Update
eas update:configure

Running eas update:configure adds updates.url and runtimeVersion to your app config (and extra.eas.projectId if the project is new to EAS). A typical result looks like this:

// app.json
{
  "expo": {
    "name": "MyAwesomeApp",
    "slug": "my-awesome-app",
    "version": "1.0.0",
    "updates": {
      "url": "https://u.expo.dev/YOUR-PROJECT-ID-HERE"
    },
    "runtimeVersion": {
      "policy": "appVersion"
    }
  }
}

Here is a breakdown of these key configurations:

  • updates.url: The specific endpoint your app will query on launch. It essentially asks the Expo servers, "Is there a newer JavaScript bundle available?"
  • runtimeVersion: A critical safety mechanism. Returning to our house analogy: if you add a new room (modifying Native code), the old furniture (an older JS bundle) might no longer fit. The runtimeVersion ensures OTA updates are only applied to builds with a compatible native layer. With the appVersion policy, bump version whenever native code changes, or consider the fingerprint policy, which derives the runtime version from the native project itself.

Next, review your eas.json file, which orchestrates your build environments (e.g., preview vs. production):

// eas.json
{
  "build": {
    "preview": {
      "channel": "preview"
    },
    "production": {
      "channel": "production"
    }
  }
}

A channel is baked into each build. A production store build asks for updates on the production channel, and by default publishing to a channel creates a branch of the same name that the channel points to.

Pushing Your First Manual OTA Update

Imagine you have just resolved the checkout bug on your local machine. You’ve tested it thoroughly, and it’s ready to go. Now, you need to distribute it to your active user base.

Instead of compiling and submitting a completely new app binary, you instruct EAS to bundle your JavaScript and publish it to the production channel.

Execute this command:

eas update --channel production --environment production --message "Hotfix: Resolved checkout screen crash"

The --environment flag selects which EAS environment variables are used for the bundle and is required from Expo SDK 55. Here is what happens:

  1. EAS traverses your project, gathering all React components, assets, and JavaScript logic.
  2. It minifies and optimizes them into a lightweight bundle.
  3. It uploads this bundle to EAS Update.
  4. It assigns the update to the branch linked to the production channel.

When a user launches a release build, the expo-updates module checks for a newer update on its channel, downloads it in the background, and applies it on the following launch. Users who do not reopen the app keep the old bundle until they do, so a fix reaches users gradually as they reopen the app. If you need help putting this release process in place for a production app, our React Native app development team works on exactly this kind of setup.

Automating with GitHub Actions (CI/CD)

Running manual commands from a developer's laptop is fine for a solo project. In a team, manual processes introduce human error. A developer might deploy to the wrong branch or forget to run the test suite before publishing.

This is where CI/CD (Continuous Integration / Continuous Deployment) becomes essential. A CI/CD pipeline runs your tests and publishes OTA updates automatically whenever code is merged.

Let's configure a GitHub Actions workflow that automatically publishes an OTA update to a preview channel whenever code is pushed to the main branch.

Create a new file at .github/workflows/ota-update.yml:

# .github/workflows/ota-update.yml
name: Publish OTA Update

# Define the trigger conditions
on:
  push:
    branches:
      - main

jobs:
  update:
    name: Publish Expo Update
    runs-on: ubuntu-latest

    steps:
      # Step 1: Checkout the repository code
      - name: Checkout code
        uses: actions/checkout@v5

      # Step 2: Set up the Node.js environment
      - name: Setup Node
        uses: actions/setup-node@v6
        with:
          node-version: 24

      # Step 3: Install project dependencies and run tests
      - name: Install dependencies
        run: npm ci

      - name: Run tests
        run: npm test

      # Step 4: Configure the EAS CLI in the runner
      - name: Setup EAS
        uses: expo/expo-github-action@v8
        with:
          eas-version: latest
          token: ${{ secrets.EXPO_TOKEN }}

      # Step 5: Execute the EAS update command
      - name: Publish update
        run: eas update --channel preview --environment preview --message "Automated CI/CD update from GitHub" --non-interactive

Security Note: Notice the ${{ secrets.EXPO_TOKEN }} variable. Never commit your actual Expo token to source control. Instead, create an access token in your Expo account settings (a robot user token scoped to the project is preferable to a personal one) and store it in your GitHub Repository Settings under "Secrets and variables." The workflow above follows the Expo docs in using eas-version: latest; pin a specific version range if you want reproducible CI runs.

With this pipeline active, merging to main runs the tests and publishes a preview update automatically. Keep production publishes behind a manual approval (for example a GitHub environment with required reviewers) so a merge never reaches every user without a human decision.

Security: Code Signing for Enterprise Apps

Because OTA updates let your app download and execute remote code, they add an attack surface. Updates are fetched over HTTPS, so the larger risk is not network interception but a compromised Expo account, leaked access token or tampered update storage being used to publish malicious code.

Code signing addresses that. The EAS CLI signs each update locally with a private key that only you hold, and the app verifies the signature against a certificate embedded in the binary before applying the update. If the signature is invalid or missing, the update is rejected. Expo documents code signing as available on the EAS Production and Enterprise plans.

Generate a key pair and certificate, then configure the project:

# Generate a private key, public key and self-signed certificate
npx expo-updates codesigning:generate \
  --key-output-directory ../keys \
  --certificate-output-directory certs \
  --certificate-validity-duration-years 10 \
  --certificate-common-name "Your Organization Name"

# Write the certificate settings into app.json
npx expo-updates codesigning:configure \
  --certificate-input-directory certs \
  --key-input-directory ../keys

This produces:

  1. A private key in ../keys, outside the repository. Store it like any other production secret, for example in a password manager or KMS. It is never uploaded to Expo.
  2. A certificate in certs/certificate.pem, which contains the public key and is committed with the app.

The configure step adds a block like this to your app.json:

// app.json
{
  "expo": {
    "updates": {
      "url": "https://u.expo.dev/YOUR-PROJECT-ID",
      "codeSigningCertificate": "./certs/certificate.pem",
      "codeSigningMetadata": {
        "keyid": "main",
        "alg": "rsa-v1_5-sha256"
      }
    }
  }
}

Publish signed updates by passing the key path, for example eas update --channel production --environment production --private-key-path ../keys/private-key.pem. In CI, write the key from a secret to a temporary file first.

Anyone who publishes without your private key cannot produce a valid signature, so the app rejects the update and keeps running the bundle it already has. Track the certificate's expiry: a build whose certificate has expired stops applying new updates until you ship a new binary.

The Future of Mobile Release Cycles

Combining React Native, EAS Update and GitHub Actions turns a JavaScript hotfix from a store submission into a reviewed, tested and signed deployment. Native changes still go through the stores, and runtime versions keep the two paths from colliding. Before relying on it in an incident, rehearse the flow: publish to a preview channel, confirm the update applies on a release build, and know how to roll back with eas update:rollback or by republishing the previous update.

Sources


Available for Work

Need help building this in production?

SoftwareCrafting is a full-stack dev agency - we ship fast, scalable React, Next.js, Node.js, React Native & Flutter apps for global clients.

Get a Free Consultation

Frequently Asked Questions

What can an over-the-air update change in a React Native app?

It can change the JavaScript bundle and assets, such as screens, logic, and images. Anything native, such as new native modules, permissions, or SDK upgrades, still needs a full store release.

Are OTA updates allowed by the App Store and Google Play?

Yes, when they update interpreted JavaScript and do not change the app's primary purpose. Shipping new native functionality or bypassing review for major feature changes is not allowed.

How do you stop an OTA update reaching the wrong app version?

Use runtime versions in EAS Update, so an update is only delivered to builds with a matching native runtime. Publish to separate channels for production, staging, and internal testers.

Why should OTA updates be code-signed?

Code signing lets the app verify that an update came from your team before it runs, which protects users if an update server or account is ever compromised. Enterprise security reviews usually ask for it.

About the author

Badal Singh

Co-founder of SoftwareCrafting

Badal Singh is the Co-founder of SoftwareCrafting in Delhi and writes technical guides about web and mobile development, backend security, cloud infrastructure, DevOps, and developer tooling.

Writes about Next.js, React, Node.js, PostgreSQL, React Native, Flutter.

View author profile

Last updated: 2026-11-07