Migrating from Branch to Airbridge in React Native
This guide will help you remove Branch integration and add Airbridge SDK to your React Native app.
1. Remove Branch Integration
1.1 Remove Package
Uninstall the Branch dependency:
npm uninstall react-native-branch1.2 iOS Changes
a) Remove Associated Domains
Navigate to: Xcode → Target → Signing & Capabilities → Associated Domains
Remove all
applinks:entries like:applinks:your-subdomain-1.app.link applinks:your-subdomain-2-alternate.app.link
b) Remove Info.plist Configurations
Delete the following keys from Info.plist:
branch_universal_link_domainsbranch_key
c) Remove Branch Code from AppDelegate
Remove these from AppDelegate.swift:
1.3 Android Changes
a) Remove Branch Config from AndroidManifest.xml
Remove the following from <application>:
b) Remove Branch from MainActivity.kt
c) Remove Branch from MainApplication.kt
d) Remove Branch Subscription Code
From your root component:
2. Add AirBridge Integration
In the code below, replace the placeholder variables YOUR_APP_NAME and YOUR_APP_SDK_TOKEN with your actual values.
Integration credentials
If you already have an AirBridge account, keep your credentials ready. If you don’t have them yet, no problem — we’ll handle the setup for you. Once you configure your referral tracking campaign and enable Mobile Apps, we’ll email you the required integration credentials, including:
YOUR_APP_SDK_TOKENYOUR_APP_NAME
If you don’t receive the email, please contact ReferralHero Support at support@referralhero.com
2.1 Install Airbridge SDK
Using NPM
Using yarn
2.2 Android Setup
a) Add Intent Filters in AndroidManifest.xml
Add under your <activity>:
Scheme Deep Link:
App Links:
b) Initialize SDK in MainApplication.kt
c) Track Deep Links in MainActivity.kt
2.3 iOS Setup
a) Associated Domains
To configure:
Open your project in Xcode.
Navigate to Target → Signing & Capabilities.
Add a new Associated Domains entry.
Add an entry in the following format:
b) Initialize SDK in AppDelegate file
c) Handle Deep Links
2.4 React Native Deep Link Handling
Place this code in the root file of your project. Fetch the required parameters and store them for later use in the Signup API. The two key parameters are:
visitor_id: The unique ID of the referred visitor who clicked the referral link. This must be included in the Signup API to track and attribute the referral upon signup.
referrer: The identifier of the original referrer. This is optional, as
visitor_idalone is sufficient for tracking the referral.
✅ Migration Complete
You’ve successfully removed Branch and integrated Airbridge.
Last updated