Guide

React Native OTA Updates: The Complete Guide

Everything you need to know about React Native OTA updates. Learn how over-the-air updates work, best practices, security considerations, and how to implement them in your app.

S
SwiftPatch Team
Engineering
15 min read

What Are OTA Updates?

Over-the-air (OTA) updates let you push new JavaScript and assets to your React Native app without going through the App Store or Google Play review process. Instead of waiting days for app store approval, you can fix bugs and ship features in seconds.

How React Native OTA Updates Work

React Native apps consist of two parts:

  1. Native shell — Compiled Objective-C/Swift (iOS) or Java/Kotlin (Android) code
  2. JavaScript bundle — Your React components, business logic, and assets

OTA updates work by replacing the JavaScript bundle at runtime. Since JavaScript isn't compiled into native code, it can be swapped without rebuilding the entire app.

The update flow:

1. App launches → checks for updates
2. Server responds with latest bundle metadata
3. App compares versions
4. If newer version exists → downloads patch
5. Patch applied → app restarts with new code

What You Can (and Can't) Update

Can update via OTA:

Cannot update via OTA:

Rule of thumb: If it requires pod install or Gradle changes, it needs a full app store release.

OTA Update Platforms Compared

PlatformPatch TypeAuto RollbackSelf-HostingFree Tier
SwiftPatchDifferential (98% smaller)YesYes5,000/mo
Expo UpdatesFull bundleNoNo1,000/mo
CodePushFull bundleNoNoDeprecated
ShorebirdDifferential (Flutter)YesNo5,000/mo

Getting Started with SwiftPatch

Step 1: Install the SDK

npm install swiftpatch

Step 2: Initialize in Your App

import { SwiftPatch } from 'swiftpatch';

SwiftPatch.init({
  deploymentKey: 'YOUR_DEPLOYMENT_KEY',
  autoRollback: true,
  checkFrequency: 'ON_APP_RESUME',
});

Step 3: Deploy Your First Update

# Build and deploy
swiftpatch release --platform ios --description "Fix login button"

That's it. Your users will receive the update within seconds.

Differential Patching Explained

Traditional OTA platforms send the entire JavaScript bundle on every update. SwiftPatch uses differential patching—only the bytes that changed are transmitted.

Example:

Full bundle approach:
  Bundle size: 20MB
  Changed 1 line of code
  Download: 20MB (entire bundle)

Differential approach:
  Bundle size: 20MB
  Changed 1 line of code
  Download: 50KB (only the diff)
  Savings: 99.75%
  • Users on slow networks get updates faster
  • Less data usage for your users
  • Lower CDN bandwidth costs for you
  • Better experience in emerging markets

Security Best Practices

1. Enable Bundle Signing

SwiftPatch.init({
  deploymentKey: 'YOUR_KEY',
  publicKey: 'YOUR_PUBLIC_KEY',
  requireSignature: true,
});

2. Use HTTPS Only

SwiftPatch enforces HTTPS by default. Never disable this.

3. Staged Rollouts

# Deploy to 5% first
swiftpatch release --platform ios --rollout 5

# After monitoring, expand
swiftpatch promote --rollout 50
swiftpatch promote --rollout 100

4. Automatic Rollback

Always enable auto-rollback in production:

SwiftPatch.init({
  autoRollback: true,
  healthCheckTimeout: 30000,
});

App Store Compliance

Both Apple and Google allow OTA JavaScript updates as long as:

  • Updates only change JavaScript and assets
  • No native code modifications
  • Updates don't change the app's primary purpose
  • Users aren't prompted to "update" in a misleading way

SwiftPatch ensures compliance by only updating the JavaScript bundle—native code is never modified.

Performance Optimization

Check Timing

// Check on app resume (recommended)
SwiftPatch.init({ checkFrequency: 'ON_APP_RESUME' });

// Check on app start
SwiftPatch.init({ checkFrequency: 'ON_APP_START' });

// Manual control
SwiftPatch.init({ checkFrequency: 'MANUAL' });
await SwiftPatch.checkForUpdate();

Silent Updates

Apply updates silently in the background:

SwiftPatch.init({
  installMode: 'ON_NEXT_RESTART',
  // Update downloads in background
  // Applied when user next opens app
});

FAQ

Q: Will OTA updates slow down my app?

A: No. SwiftPatch applies patches at startup before your app renders. With differential patching, the download is typically under 200KB.

Q: Can I use OTA updates with React Native New Architecture?

A: Yes. SwiftPatch fully supports React Native's New Architecture (Fabric, TurboModules).

Q: What happens if an update fails?

A: SwiftPatch automatically rolls back to the last working version. Your users never see a broken app.

Q: Is this allowed by Apple/Google?

A: Yes. JavaScript-only updates are explicitly allowed by both app stores.

Conclusion

OTA updates are essential for any production React Native app. They let you fix bugs instantly, ship features faster, and improve user experience—all without app store delays.

SwiftPatch makes it simple: install the SDK, deploy an update, and your users have it in seconds.

Get started free with SwiftPatch →

Ready to ship updates faster?

Get started with SwiftPatch for free. No credit card required.

Join Waitlist

Related Articles