Mobile SDKDeep Link
React Native
AdStage DeepLink Integration Guide (React Native)
Table of Contents
- Overview
- Installation
- Platform-Specific Setup
- SDK Initialization
- Handling Incoming Deep Links
- Creating Deep Links
- Troubleshooting
Overview
The AdStage DeepLink SDK for React Native provides the following features:
- Real-time deep links: Instant handling via URL Scheme, App Link/Universal Links
- Deferred deep links: Automatic restoration on first launch after app installation
- Dynamic deep link creation: Generation of trackable links via the server API
- Attribution tracking: Marketing analysis based on UTM parameters
- Cross-platform: Identical API for Android/iOS
Supported Deep Link Types
- URL Scheme:
myapp://promo/summer - Android App Links:
https://go.myapp.com/abc123 - iOS Universal Links:
https://go.myapp.com/abc123 - Deferred deep links: When the app is not installed, store → install → restored on app launch
Installation
npm / yarn Installation
iOS Dependency Installation
Platform-Specific Setup
iOS Setup
1. ATT (App Tracking Transparency) Permission (Required)
Add the following to ios/YourApp/Info.plist:
2. URL Scheme Setup
Add the following to ios/YourApp/Info.plist:
3. Universal Links Setup (Optional)
Add the following to ios/YourApp/YourApp.entitlements:
4. Modifying AppDelegate.mm
In the ios/YourApp/AppDelegate.mm file, add the methods for handling deep links:
Android Setup
1. Adding the Maven Repository (Required)
Add to android/settings.gradle or android/build.gradle:
2. minSdkVersion Setup
Verify in android/build.gradle:
3. AndroidManifest.xml Setup
Add the Intent Filter to android/app/src/main/AndroidManifest.xml:
4. launchMode Important Notes
- ✅ singleTask: Reuses the existing Activity (recommended)
- ⚠️ singleTop: Reuses only when at the top of the stack
- ❌ standard: Creates a new instance every time (causes duplicate deep links)
SDK Initialization
Basic Initialization
Handling Incoming Deep Links
1. Setting Up the Deep Link Listener
2. DeepLinkData Structure
3. Handling Pending Deep Links
When the app is launched via a deep link from a fully terminated state:
4. Practical Example: React Navigation Integration
Creating Deep Links
Basic Deep Link Creation
CreateDeepLinkRequest Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | ✅ | Deep link name |
description | string | - | Deep link description |
shortPath | string | - | Custom Short Path |
channel | string | - | Channel |
subChannel | string | - | Sub channel |
campaign | string | - | Campaign |
adGroup | string | - | Ad group |
creative | string | - | Ad creative |
content | string | - | Content |
keyword | string | - | Keyword |
redirectConfig | RedirectConfig | - | Redirect configuration |
parameters | object | - | Custom parameters |
RedirectConfig Structure
| Type | App Installed | App Not Installed |
|---|---|---|
STORE | Go to store | Go to store |
APP | Launch app (real-time deep link) | Go to store → deferred deep link after install |
WEB | Go to web URL | Go to web URL |
Utility Functions
Extracting Short Path
Manual Android Intent Handling
Troubleshooting
iOS Issues
Deep links are not received
- Verify that the URL Scheme is correctly configured in Info.plist
- Verify that the deep link handling methods have been added to AppDelegate.mm
- For Universal Links, verify that Associated Domains is configured
The ATT permission popup is not displayed
- Verify that the
NSUserTrackingUsageDescriptionkey exists in Info.plist
Android Issues
Duplicate deep link reception
- Verify the
android:launchMode="singleTask"setting
Deep links are not received
- Verify the Intent Filter in AndroidManifest.xml
- Verify the
android:exported="true"setting - For App Links, verify the Digital Asset Links file
Common Issues
Deferred deep links do not work
- Verify that the listener was set up after SDK initialization completed
- Verify whether
checkPendingDeepLink()was called - Verify the network connection status
Parameters are not passed
- Verify that values were correctly set in the
parametersobject when creating the deep link

