Mobile SDKDeep Link
React Native Deep Link
This guide describes how to implement deep links in a React Native application using the NBase AdStage SDK.
1. Overview
- A deep link is a URL that takes users directly to a specific screen in your app.
- The AdStage SDK provides deep link creation, handling, and tracking.
2. Quick start
2.1 Install SDK
2.2 Basic setup
Android setup
android/app/src/main/java/.../MainActivity.java:
android/app/src/main/AndroidManifest.xml:
iOS setup
ios/<Project>/Info.plist:
ios/<Project>/AppDelegate.mm:
3. React Native implementation
3.1 Set up deep link listener
3.2 Create deep links
Create deep links for sharing or marketing within your app.
4. Testing
4.1 ADB (Android)
4.2 iOS Simulator
5. Troubleshooting
Deep link not received
- Ensure URL scheme is correctly set in AndroidManifest.xml and Info.plist
- Ensure native initialization (e.g., AdStageInitializer.load()) is completed
- Ensure deep link listener is properly registered
Android deep link issues
- Check onNewIntentimplementation in MainActivity
- Verify android:launchMode="singleTop"
- Test in background/terminated states
iOS deep link issues
- Verify application:openURL:options:implementation
- Ensure AdStageInitializer.load()is called
- Check URL Schemes settings
Build errors
- Re-run npm install && cd ios && pod install
- Clear cache: npx react-native start --reset-cache

