| title | Expo Deep linking integration |
|---|---|
| category | 5f9705393c689a065c409b23 |
| parentDoc | 645213236f53a00d4daa9230 |
| order | 8 |
| hidden | false |
Prerequisite: see Expo Installation for the React Native / Expo SDK version requirements.
See Deep Linking Integration for concepts — this doc covers Expo-specific wiring only.
-
App.json configuration: Configure intent filters, URI scheme, and associated domains as described in Expo's guide. See the Full app.json example below.
-
iOS AppDelegate wiring: The Expo config plugin automatically injects the required AppsFlyer deep-link handlers into your app's AppDelegate at
expo prebuildtime. For both ObjC and Swift templates, it adds:AppsFlyerAttribution.shared.handleOpen(url:options:)intoopenURLAppsFlyerAttribution.shared.continueUserActivity(userActivity:restorationHandler:)intocontinueUserActivity(forwarding the realrestorationHandler)AppsFlyerAttribution.shared.handleLaunchOptions(launchOptions)intodidFinishLaunchingWithOptions
All three route through
AppsFlyerAttribution.shared, notAppsFlyerLib.shared()directly — one import (react_native_appsflyer) covers the whole AppDelegate. See Deep Linking Integration for whyopenURL/continueUserActivitybuffer (calls that arrive beforestart()has succeeded natively);handleLaunchOptionshas no such hazard and forwards immediately.See Expo Installation for full details.
-
Android deep-link handling: You must add
setIntent()inside theonNewIntentmethod as described here. This plugin does not add this code automatically, so implement it manually or with a custom config plugin.
The following app.json snippet shows the deep-linking-specific configuration. For the full list of plugin configuration options, see Expo Installation.
{
"expo": {
"plugins": [
"react-native-appsflyer"
],
"scheme": "my-own-scheme",
"ios": {
"bundleIdentifier": "com.appsflyer.expoaftest",
"associatedDomains": ["applinks:expotest.onelink.me"]
},
"android": {
"package": "com.af.expotest",
"intentFilters": [
{
"action": "VIEW",
"data": [
{
"scheme": "https",
"host": "expotest.onelink.me",
"pathPrefix": "/DvWi"
}
],
"category": ["BROWSABLE", "DEFAULT"]
},
{
"action": "VIEW",
"data": [
{
"scheme": "my-own-scheme"
}
],
"category": ["BROWSABLE", "DEFAULT"]
}
]
}
}
}