Expo Deep linking integration

시작하기

alt text

Deep Linking Types

  1. 디퍼드 딥링킹 - 신규 또는 재방문 사용자가 앱을 인스톨한 후에 바로 맞춤형 콘텐츠를 제공합니다.
  2. 직접 딥링킹 - 이미 모바일 앱을 인스톨한 기존 사용자에게 맞춤형 콘텐츠를 직접 제공합니다.

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.

자세한 내용은 OneLink™ 디퍼드 딥링킹 가이드개발자 가이드를 확인하세요.

Implementation for Expo

  1. In order to use AppsFlyer's deeplinks you need to configure intent filters/scheme/associatedDomains as described in Expo's guide.

  2. For Android apps: You need to add setIntent() inside the onNewIntent 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"
    }
  }
}