Integration in Expo
This track covers integrating the Airborne React Native SDK into an Expo app. Airborne boots before React Native mounts, fetches the latest JavaScript bundle and assets described by your release config, and hands React Native the path to boot from — exactly as in the plain React Native track. The only difference is where the native wiring goes: Expo manages its own ReactActivityDelegate, ReactNativeHost, and AppDelegate, so the Airborne pieces are layered on top of Expo's wrappers rather than replacing them.
Prerequisites
- An Expo app that uses Expo's bare/prebuild native projects (the
android/andios/directories must exist — Airborne integrates at the native layer and cannot run in Expo Go). - React Native's New Architecture enabled (the Expo wrappers and code samples below assume it).
- A release URL of the form
https://airborne.juspay.in/release/<organisation>/<application>, or a self-hosted release config JSON. - The
airborne-react-nativepackage installed (see below).
Airborne wires into the native launch sequence, so the app must be built with the native projects present (expo prebuild / a development or release build). It will not work under Expo Go.
How it differs from bare React Native
The Airborne classes are identical across both tracks — the Expo integration simply wraps them in Expo's own delegates so Expo's lifecycle hooks keep running:
| Concern | Plain React Native | Expo |
|---|---|---|
| Activity delegate | AirborneReactActivityDelegate returned directly | AirborneReactActivityDelegate wrapped in ReactActivityDelegateWrapper |
| React Native host | AirborneReactNativeHost returned directly | AirborneReactNativeHost wrapped in ReactNativeHostWrapper |
| JS main module name | index | .expo/.virtual-metro-entry |
| App delegate base class | UIResponder, UIApplicationDelegate | ExpoAppDelegate |
| iOS launch hooks | one application(_:didFinishLaunchingWithOptions:) | three application functions — update only didFinishLaunchingWithOptions |
| React Native module name (iOS) | your app name | "main" |
Installing the SDK
The SDK is published to npm as airborne-react-native. Add it to your package.json:
{
"dependencies": {
"airborne-react-native": "^0.37.0"
}
}
Then install and regenerate the native projects:
npm install
npx expo prebuild
The SDK is also available from the GitHub repository.
Integration outline
Work through these pages in order:
- Android setup — add the Maven repository, wrap
AirborneReactActivityDelegateandAirborneReactNativeHostin Expo's wrappers, and initialize Airborne inMainApplication. - iOS setup — add a bridging header, initialize Airborne in your
ExpoAppDelegate, and implement theAirborneDelegateextension. - Bundling the release config — ship a
release_config.jsonfor the first-boot / offline fallback.
The JS API and events are identical
Once the native wiring is in place, the JavaScript surface and the SDK event stream are the same as the plain React Native track — there is nothing Expo-specific in JavaScript. See the references:
- JavaScript API —
readReleaseConfig,getBundlePath,getFileContent. - Android API and iOS API — the native callbacks you implement.
- Callbacks & events — the full SDK event catalogue delivered to
onEvent.