Expo Deep linking integration
Démarrer
Deep Linking Types
- Deep linking différé : diffusion de contenu personnalisé à des utilisateurs nouveaux ou anciens, directement après l'installation.
- Deep linking direct : diffusion directe de contenu personnalisé aux utilisateurs existants qui ont déjà installé l’app mobile.
Unified deep linking (UDL) - an API which enables you to send new and existing users to a specific in-app activity as soon as the app is opened.
Pour plus d'informations, veuillez consulter le Guide du deep linking OneLink™ et le guide du développeur.
Implementation for Expo
-
In order to use AppsFlyer's deeplinks you need to configure intent filters/scheme/associatedDomains as described in Expo's guide.
-
For Android apps: You need to add
setIntent()
inside theonNewIntent
method like described here. This plugin is NOT adding this code out the box, so you need to implement it manually or with custom config plugin
Full app.json example
{
"expo": {
"name": "expoAppsFlyer",
"slug": "expoAppsFlyer",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/atom.png",
"plugins": [
[
"react-native-appsflyer",
{ "shouldUseStrictMode": true } // <<-- only for strict mode
]
],
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": ["**/*"],
"scheme": "my-own-scheme", // <<-- uri scheme as configured on AF dashboard
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.appsflyer.expoaftest",
"associatedDomains": ["applinks:expotest.onelink.me"] // <<-- important in order to use universal links
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#FFFFFF"
},
"package": "com.af.expotest",
"intentFilters": [
{
"action": "VIEW",
"data": [
{
"scheme": "https",
"host": "expotest.onelink.me", // <<-- important for android App Links
"pathPrefix": "/DvWi" // <<-- set your onelink template id
}
],
"category": ["BROWSABLE", "DEFAULT"]
},
{
"action": "VIEW",
"data": [
{
"scheme": "my-own-scheme" // <<-- uri scheme as configured on AF dashboard
}
],
"category": ["BROWSABLE", "DEFAULT"]
}
]
},
"web": {
"favicon": "./assets/favicon.png"
}
}
}
Mis(e) à jour il y a environ 1 mois