How to Set Up RevenueCat and Airbridge Attribution in React Native and Flutter Apps

Step-by-step guide to connecting Airbridge (React Native v4.12.0 & Flutter) with RevenueCat: native init, airbridge.json, ID matching, SKAN, and QA.

Airbridge8 min read
How to Set Up RevenueCat and Airbridge Attribution in React Native and Flutter Apps

Key Takeaways

  • Native Initialization Is Required in Both Frameworks: Both airbridge-react-native-sdk (v4.12.0) and airbridge_flutter_sdk initialize inside native iOS (AppDelegate) and Android (MainApplication) files so installs and deep links capture before JS or Dart boots.
  • Flutter v4.11.0+ Requires airbridge.json in pubspec.yaml: In Flutter, create airbridge.json at the project root and declare - airbridge.json under flutter: assets: in pubspec.yaml, or iOS Swift Package Manager builds will ignore your settings.
  • Wire Both Device ID and User ID: Forward the Airbridge Device UUID (via Airbridge's native fetchDeviceUUID fetching guide) to RevenueCat's $airbridgeDeviceId / setAirbridgeDeviceID() alongside collectDeviceIdentifiers(), and pass RevenueCat's App User ID into Airbridge.setUserID() in JS or Dart.
  • Enable Server-Side SKAN & Disable Client Subscription Events: Set "calculateSKAdNetworkByServerEnabled": true in airbridge.json and do not call Airbridge.trackEvent() for START_TRIAL, SUBSCRIBE, or UNSUBSCRIBE—let RevenueCat send them S2S.
  • Core Plan Covers Both SDKs Self-Serve: React Native, Flutter, Expo, iOS, Android, and Unity SDKs plus up to 2 third-party integrations (such as RevenueCat, Adapty, or Superwall) are included on Airbridge's Core Plan (14-day free trial, then $40+/mo, 500,000 data points/mo, no annual lock-in).

To set up RevenueCat and Airbridge attribution in a React Native or Flutter app, install and initialize the Airbridge SDK natively in AppDelegate (iOS) and MainApplication (Android), configure airbridge.json with server-side SKAN enabled, bridge your Airbridge Device UUID and RevenueCat App User ID before the paywall, paste your Airbridge Subdomain and Token into RevenueCat with default event names, and verify one clean server-to-server event in Airbridge's App Real-time Log.

Cross-platform frameworks like React Native and Flutter let a one- or two-developer team ship iOS and Android subscription apps from one repo, which is why they dominate indie consumer AI and health apps. The only catch with mobile attribution in cross-platform apps is that install capture, ATT timing, and deep link callbacks happen at the native layer—before your JavaScript or Dart code even renders the first screen.

This guide walks through the exact React Native and Flutter setup using verified Airbridge SDK v4 methods and RevenueCat's official Airbridge integration flow.

React Native vs. Flutter Airbridge SDK Setup at a Glance

Both SDKs share the same airbridge.json configuration schema and v4.12.0 ATT APIs, with a few framework-specific differences that commonly trip up builds.

Setup StepReact Native (airbridge-react-native-sdk v4.12.0)Flutter (airbridge_flutter_sdk)
Package installnpm install airbridge-react-native-sdk then cd ios; pod installAdd airbridge_flutter_sdk to pubspec.yaml and run flutter pub get
iOS dependency managerCocoaPods (cd ios; pod install)CocoaPods or Swift Package Manager (v4.11.0+, minimum iOS 12.0)
iOS native initAirbridgeReactNative.initializeSDK(name:token:) in AppDelegateAirbridgeFlutter.initializeSDK(name:token:) in AppDelegate.swift
Android native initAirbridgeReactNative.initializeSDK(this, name, token) in MainApplicationAirbridgeFlutter.initializeSDK(this, name, token) in MainApplication.kt
Config file (airbridge.json)Root of React Native project folderRoot of Flutter project folder AND listed under flutter: assets: in pubspec.yaml
User ID syncAirbridge.setUserID(appUserId) / Airbridge.clearUserID()Airbridge.setUserID(appUserId); / Airbridge.clearUserID();
ATT consent (v4.12.0+)await Airbridge.requestTrackingAuthorization((status) => ...)await Airbridge.requestTrackingAuthorization(onComplete: (status) => ...)
Deep link callbackAirbridge.setOnDeeplinkReceived((url) => ...)Airbridge.setOnDeeplinkReceived((url) { ... });

Step 1: Copy Credentials and Connect RevenueCat in the Dashboards

Start on the dashboard side so your App Name (Subdomain), App SDK Token, and RevenueCat integration token are ready.

  1. Get SDK credentials: In the Airbridge dashboard, go to Settings > Tokens and note your App Name (YOUR_APP_NAME) and App SDK Token (YOUR_APP_SDK_TOKEN) for SDK initialization.
  2. Get RevenueCat integration credentials: Go to Integrations > Third-party Integration > RevenueCat and copy the Airbridge Subdomain and Airbridge Token.
  3. Add Airbridge in RevenueCat: Open the RevenueCat dashboard, click Integrations in the left sidebar, select Airbridge under Attribution, and paste your Airbridge Subdomain and Airbridge Token.
  4. Use default event names: Under Event names, click Use default event names so RevenueCat pre-maps TRIAL_STARTED → Start Trial, INITIAL_PURCHASE / TRIAL_CONVERTED / RENEWAL → Subscribe, and CANCELLATION → Unsubscribe.
  5. Pick Gross or Net revenue mode: Choose Gross (before store fees/taxes) or Net (after estimated store fees/taxes) under Revenue reporting mode, then click Add integration.

Full dashboard reference is in the Airbridge RevenueCat integration guide.

Step 2: Install and Initialize the Airbridge SDK

Install the standard SDK (do not install the Restricted SDK if you want IDFA/GAID device attribution) and add native initialization on both platforms.

React Native Setup (v4.12.0)

Install the package and iOS pods:

npm install airbridge-react-native-sdk
cd ios && pod install

Initialize on iOS (AppDelegate):

import AirbridgeReactNative

func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
    AirbridgeReactNative.initializeSDK(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
    return true
}

Initialize on Android (MainApplication.kt):

import co.ab180.airbridge.reactnative.AirbridgeReactNative

override fun onCreate() {
    super.onCreate()
    AirbridgeReactNative.initializeSDK(this, "YOUR_APP_NAME", "YOUR_APP_SDK_TOKEN")
}

Flutter Setup

Add airbridge_flutter_sdk to pubspec.yaml and run flutter pub get. On Airbridge Flutter SDK v4.11.0+, both CocoaPods and Swift Package Manager are supported on iOS (minimum iOS deployment target 12.0).

Initialize on iOS (ios/Runner/AppDelegate.swift):

import airbridge_flutter_sdk

override func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
    AirbridgeFlutter.initializeSDK(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
    return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}

Initialize on Android (MainApplication.kt, registered as android:name=".MainApplication" in AndroidManifest.xml):

import android.app.Application
import co.ab180.airbridge.flutter.AirbridgeFlutter

class MainApplication : Application() {
    override fun onCreate() {
        super.onCreate()
        AirbridgeFlutter.initializeSDK(this, "YOUR_APP_NAME", "YOUR_APP_SDK_TOKEN")
    }
}

Step 3: Configure airbridge.json for Server-Side SKAN and ATT

Create airbridge.json at the top level of your React Native or Flutter project. Include only the keys your app needs—for a RevenueCat subscription app, calculateSKAdNetworkByServerEnabled and autoDetermineTrackingAuthorizationTimeoutInSecond are the two essentials:

{
  "autoDetermineTrackingAuthorizationTimeoutInSecond": 30,
  "calculateSKAdNetworkByServerEnabled": true
}
  • calculateSKAdNetworkByServerEnabled: true lets Airbridge calculate iOS SKAdNetwork conversion values on the server from RevenueCat's server-to-server subscription events (requires Airbridge iOS SDK v4.8.0+; v4.8.1+ recommended).
  • autoDetermineTrackingAuthorizationTimeoutInSecond (default 30 seconds, max 3,600 seconds) gives your user time to respond to the iOS ATT prompt before Airbridge dispatches the Install (App) event.
  • If you run Meta Ads on Android, you can also add "metaInstallReferrerAppID": "YOUR_META_APP_ID" here.

Airbridge Flutter SDK requirement (v4.11.0+): Declare airbridge.json in pubspec.yaml so iOS Swift Package Manager and Android builds bundle it cleanly (never declare dev/staging variants like airbridge.development.json in assets):

flutter:
  assets:
    - airbridge.json

This is the step that ties your attribution SDK and RevenueCat together. Handle both identifiers before the user hits your paywall:

1. Match RevenueCat's App User ID with Airbridge.setUserID()

In React Native (TypeScript):

import { Airbridge } from 'airbridge-react-native-sdk'

// Listen for direct and deferred deep links
Airbridge.setOnDeeplinkReceived((url) => {
  // Route the user to the target screen
})

// Request iOS ATT consent while the app is active (RN SDK v4.12.0+)
await Airbridge.requestTrackingAuthorization((status) => {
  // If status is 'Authorized', re-run RevenueCat collectDeviceIdentifiers()
})

// Sync RevenueCat's App User ID to Airbridge before paywall/purchase
Airbridge.setUserID(revenueCatAppUserId)

// On logout, clear the Airbridge User ID
// Airbridge.clearUserID()

In Flutter (Dart):

import 'package:airbridge_flutter_sdk/airbridge_flutter_sdk.dart';

// Listen for direct and deferred deep links
Airbridge.setOnDeeplinkReceived((url) {
  // Route the user to the target screen
});

// Request iOS ATT consent while the app is active (Flutter SDK v4.12.0+)
await Airbridge.requestTrackingAuthorization(onComplete: (status) {
  // If status == AirbridgeTrackingAuthorization.authorized,
  // re-run RevenueCat collectDeviceIdentifiers()
});

// Sync RevenueCat's App User ID to Airbridge before paywall/purchase
Airbridge.setUserID(revenueCatAppUserId);

// On logout, clear the Airbridge User ID
// Airbridge.clearUserID();

Don't forget to wire native deep link callbacks (AirbridgeReactNative.trackDeeplink(...) or AirbridgeFlutter.trackDeeplink(...), using trackDeeplink(openURLContexts:) in a SceneDelegate) so Airbridge captures deep link opens on both cold and warm starts.

2. Pass the Airbridge Device UUID and Device Identifiers to RevenueCat

RevenueCat recommends attaching five Customer Attributes ($airbridgeDeviceId, $idfa, $idfv, $gpsAdId, and $ip) before the first purchase occurs:

  • Collect standard device IDs in RevenueCat: Call RevenueCat's collectDeviceIdentifiers() right after configuring the Purchases SDK, and call it again inside your ATT completion callback if the user grants tracking permission on iOS 14.5+.
  • Forward $airbridgeDeviceId: Retrieve the Airbridge Device UUID via Airbridge's native Data Fetching API (fetchDeviceUUID—documented in Airbridge's native iOS, Android, and React Native Data Fetching Guides) and pass it to RevenueCat via setAirbridgeDeviceID(deviceUUID) (or RevenueCat's $airbridgeDeviceId attribute). In React Native and Flutter apps, you can execute this handoff directly in your native AppDelegate / MainApplication layer right after initializing both SDKs or expose the fetched UUID through your existing platform bridge.

3. Keep Subscription Events Out of Airbridge.trackEvent()

Do not call Airbridge.trackEvent() with AirbridgeCategory.START_TRIAL, AirbridgeCategory.SUBSCRIBE, or AirbridgeCategory.UNSUBSCRIBE in your React Native or Flutter purchase handlers. Let RevenueCat dispatch all subscription lifecycle events server-to-server so you never double-count conversions. Keep Airbridge.trackEvent() strictly for upper-funnel events like sign-up, sign-in, or onboarding completion (and, on Core Plan, AirbridgeCategory.ORDER_COMPLETED only for non-subscription one-time IAPs if not routed through RevenueCat).

Step 5: Verify End-to-End Before Shipping to Production

Run this four-point QA check on a physical iOS and Android device before submitting to the App Store or Google Play.

Verification StepTool / ScreenWhat Pass Looks Like
1. SDK init & deep linksAirbridge Test Console & App Real-time LogInstall (App) and Open (App) appear cleanly; deep link routes to target screen
2. Device & user attributesRevenueCat Customer View$airbridgeDeviceId, $idfa/$idfv (iOS) or $gpsAdId (Android), and $ip appear before purchase
3. S2S webhook deliveryRevenueCat Customer History & Last dispatched eventsSandbox purchase delivers TRIAL_STARTED or INITIAL_PURCHASE to Airbridge with HTTP success
4. Single clean event in AirbridgeAirbridge App Real-time Log (wait up to 10 min) & Actuals ReportExactly 1 Start Trial or Subscribe row arrives, with matching User ID and charged amount

If you run ads across Google Ads, Meta Ads, Apple Ads, and TikTok for Business, you can start measuring attributed installs, subscription revenue, cohort ROAS, and Predictive LTV (1–180 days) on the self-serve Airbridge Core Plan—starting with a 14-day free trial, then $40+/mo for 500,000 data points/month ($0.0001 per extra) with no annual lock-in. Teams that later need custom RevenueCat events (TRIAL_CANCELLED, REFUND, SUBSCRIPTION_EXTENDED) or 330+ ad networks can move to the Growth Plan without changing their core SDK setup.

FAQS

Frequently Asked Questions

Why didn't my Flutter app apply the settings in airbridge.json on iOS?

Starting in Airbridge Flutter SDK v4.11.0, you must both place airbridge.json in your Flutter project root and declare - airbridge.json under flutter: assets: in pubspec.yaml. Without that asset declaration, Swift Package Manager builds on iOS cannot locate airbridge.json and log a missing-file warning.

Which Airbridge React Native SDK version do I need for the built-in ATT prompt methods?

Airbridge React Native SDK v4.12.0 or later (and Airbridge Flutter SDK v4.12.0 or later) is required to call Airbridge.requestTrackingAuthorization() and Airbridge.trackingAuthorizationStatus(). Make sure NSUserTrackingUsageDescription is added to your iOS Info.plist and call the prompt only while the app is active.

Should I call Airbridge.trackEvent with AirbridgeCategory.SUBSCRIBE in my React Native or Flutter purchase callback?

No—once RevenueCat is connected to Airbridge, RevenueCat sends Start Trial, Subscribe, and Unsubscribe server-to-server. Calling Airbridge.trackEvent() for those same subscription events in JS or Dart will double-count every conversion.

How do I keep iOS SKAdNetwork 4.0 conversion values working in React Native or Flutter with RevenueCat S2S events?

Add "calculateSKAdNetworkByServerEnabled": true to your airbridge.json file (supported on Airbridge iOS SDK v4.8.0+, v4.8.1+ recommended). Airbridge will then use the incoming server-to-server RevenueCat events to calculate SKAN conversion values automatically.

Does Airbridge support Expo apps as well as bare React Native and Flutter?

Yes—Airbridge documents official Core Plan SDK support across iOS, Android, React Native (v4.12.0), Flutter, Expo, and Unity, alongside Web SDK and S2S API support, all starting with a 14-day free trial and then $40+/mo with no annual lock-in.