react-native-airdrop
v0.2.0
Published
Over-the-air updates for React Native (bare and Expo): signed releases, staged rollouts, automatic rollback.
Downloads
123
Maintainers
Readme
Airdrop for React Native
SDK and CLI for Airdrop over-the-air updates.
Ship JavaScript and asset fixes to production in minutes, without waiting for App Store / Play Store review. Airdrop is a hosted service, delivered from Cloudflare's edge: request early access to get your app token.
Website & docs · Getting started · How it works
airdrop release --platform ios --message "Fix checkout button" --rollout 20What's in this repository
| package | npm | what |
|---|---|---|
| packages/react-native | react-native-airdrop | the SDK: native update manager for iOS (Objective-C) and Android (Java) + JS API |
| packages/cli | react-native-airdrop-cli | the airdrop CLI: bundle, sign, upload and manage releases |
| packages/core | (bundled into the CLI) | wire protocol, request validation, signing message, rollout bucketing |
Why
- Pricing that scales. Free up to 10K monthly active users, then flat monthly plans. Pricing →
- Safe by default.
- Automatic crash rollback: an update that crashes before the app renders is rolled back on the next launch and never installed again.
- SHA-256 verification of every file, plus optional end-to-end code signing (ECDSA P-256) with the public key baked into the binary: not even Airdrop's servers can ship code to your users.
- Runtime-version targeting: JS only reaches binaries with compatible native code; a new store build discards old OTA updates.
- Fast. Content-addressed files: devices download only what changed, gzip-compressed and edge-cached.
- Release controls. Channels, staged rollouts (1-100%), mandatory updates, instant rollback, promote between channels, install/rollback stats.
- Works with bare React Native 0.71 → 0.87+, old and new architecture, Hermes and JSC, iOS and Android. Bare React Native or Expo (config plugin:
plugins: ["react-native-airdrop"]).
Native code (Swift/Kotlin, new native modules, permissions) can't be updated over the air on any platform: Apple and Google forbid downloading executable code. Airdrop keeps JS and native in sync with runtime versions instead. Details →
Quick start
1. Install the SDK
npm install react-native-airdrop
cd ios && pod install2. Point your app at Airdrop (release builds only — debug keeps using Metro)
// iOS · AppDelegate.swift
import ReactNativeAirdrop
override func bundleURL() -> URL? {
#if DEBUG
RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index")
#else
RNAirdrop.bundleURL()
#endif
}// Android · MainApplication.kt
import com.rnairdrop.Airdrop
override val reactHost: ReactHost by lazy {
getDefaultReactHost(
context = applicationContext,
packageList = PackageList(this).packages,
jsBundleFilePath = Airdrop.getJSBundleFile(applicationContext),
)
}Add AirdropServerURL / AirdropAppId to Info.plist and airdrop_server_url / airdrop_app_id to strings.xml
(airdrop init prints the exact values).
3. Wrap your root component
import { withAirdrop } from "react-native-airdrop";
export default withAirdrop(App); // checks on launch, applies on next restart4. Release
npm install -g react-native-airdrop-cli
airdrop login --token <your-app-token> # from your early-access email
airdrop init --sign # links your app, generates a signing key
airdrop release --platform android --private-key airdrop-private-key.pemFull guide, including older React Native versions: Getting started.
Managing releases
airdrop updates list # history with installs & rollbacks
airdrop release -p ios --rollout 10 # staged rollout
airdrop rollout <updateId> 100 # widen it
airdrop rollback <updateId> # pull a bad update; devices fall back automatically
airdrop promote <updateId> --to production # staging → production (signature stays valid)Development
pnpm install
pnpm typecheck
pnpm test
pnpm buildAndroid update-manager unit tests run on a plain JVM (no Gradle), see .github/workflows/ci.yml.
Contributing
Issues and pull requests are welcome. See CONTRIBUTING.md.
