> ## Documentation Index
> Fetch the complete documentation index at: https://help.airbridge.io/llms.txt
> Use this file to discover all available pages before exploring further.

# DeepLink - SDK Quickstart

## Dashboard Setup

1. Sign in to your [Airbridge](https://app.airbridge.io/app) account.
2. Click **Add a new app**.
3. Add your app to Airbridge.  Once you're done, go to **\[Tracking Links]>\[Deep Links]** and submit the deep link information to Airbridge.

<AccordionGroup>
  <Accordion title="Submit deep link information for Android">
    **Android URI Scheme**

    Input the URI scheme of the deep links you will use. The deep links you use to create tracking links for user redirection must use this URI Scheme.

    **Android Package Name**

    Input the app's package name. Example: `com.example.application`

    **sha256\_cert\_fingerprints**

    Input the SHA256 hash value of the `KeyStore` file used to sign the app. To find the hash values, refer to the information below.

    ```bash Shell lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
    keytool -J-Duser.language=en -list -v -keystore YOUR_KEYSTORE.keystore
    ```

    ```bash Result lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
    Certificate fingerprints:
        MD5:  4C:65:04:52:F0:3F:F8:65:08:D3:71:86:FC:EF:C3:49
        SHA1: C8:BF:B7:B8:94:EA:5D:9D:38:59:FE:99:63:ED:47:B2:D9:5A:4E:CC
        SHA256: B5:EF:4D:F9:DC:95:E6:9B:F3:9A:5E:E9:D6:E0:D8:F6:7B:AB:79:C8:78:67:34:D9:A7:01:AB:6A:86:01:0E:99
    ```
  </Accordion>

  <Accordion title="Submit deep link information for iOS">
    **iOS URI Scheme**

    Input the URI scheme of the deep links you will use. The deep links you use to create tracking links for user redirection must use this URI Scheme.

    **iOS App ID**

    Go to the [Apple Developer](https://idmsa.apple.com/IDMSWebAuth/signin?appIdKey=891bd3417a7776362562d2197f89480a8547b108fd934911bcbea0110d07f757\&path=%2Faccount%2Fresources%2F\&rv=1), find the App ID Prefix and the Bundle ID, and input them in the format of `App ID Prefix` + . + `Bundle ID`.
  </Accordion>
</AccordionGroup>

## SDK Setup

Install the Airbridge SDK in your app and complete the essential setup.

<AccordionGroup>
  <Accordion title="Android SDK">
    ### SDK setup

    To install the Airbridge Android SDK, declare the SDK repository in the `build.gradle` or `settings.gradle` file of your project that contains the repositories block. Then, add the SDK package to your application's `build.gradle` file.

    Check the latest version at the link below and replace `$HERE_LATEST_VERSION`.

    * [SDK version list](https://sdk-download.airbridge.io/maven/io/airbridge/sdk-android/index.html)

    **Project** **`build.gradle`** **or** **`settings.gradle`** **file**

    <CodeGroup>
      ```groovy build.gradle (Groovy) lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      allprojects {
          repositories {
              maven { url = uri("https://sdk-download.airbridge.io/maven") }
          }
      }
      ```

      ```kotlin build.gradle (Kotlin DSL) lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      allprojects {
          repositories {
              maven { url = uri("https://sdk-download.airbridge.io/maven") }
          }
      }
      ```

      ```groovy settings.gradle (Groovy) lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      dependencyResolutionManagement {
          repositories {
              maven { url = uri("https://sdk-download.airbridge.io/maven") }
          }
      }
      ```

      ```kotlin settings.gradle (Kotlin DSL) lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      dependencyResolutionManagement {
          repositories {
              maven { url = uri("https://sdk-download.airbridge.io/maven") }
          }
      }
      ```
    </CodeGroup>

    **Application** **`build.gradle`** **file**

    <CodeGroup>
      ```groovy Groovy lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      dependencies {
          // Replace $HERE_LATEST_VERSION with latest version
          // - Versions: https://sdk-download.airbridge.io/maven
          // - Example: implementation "io.airbridge:sdk-android:0.0.0"
          implementation "io.airbridge:sdk-android:$HERE_LATEST_VERSION"
      }
      ```

      ```kotlin Kotlin DSL lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      dependencies {
          // Replace $HERE_LATEST_VERSION with latest version
          // - Versions: https://sdk-download.airbridge.io/maven
          // - Example: implementation "io.airbridge:sdk-android:0.0.0"
          implementation("io.airbridge:sdk-android:$HERE_LATEST_VERSION")
      }
      ```
    </CodeGroup>

    ### SDK initialization

    Create the `MainApplication` class and add it to the `AndroidManifest.xml`. Then, initialize the SDK in the `onCreate` function within the class.

    The `YOUR_APP_NAME` and `YOUR_APP_SDK_TOKEN` can be found on the \[Settings]>\[Tokens] page in the Airbridge dashboard.

    ```xml AndroidManifest.xml lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
     <application
        android:name=".MainApplication"
        ...>
    ```

    <CodeGroup>
      ```kotlin Kotlin lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      import android.app.Application

      import co.ab180.airbridge.Airbridge
      import co.ab180.airbridge.AirbridgeOption
      import co.ab180.airbridge.AirbridgeOptionBuilder

      class MainApplication: Application() {
          override fun onCreate() {
              super.onCreate()
              // YOUR_APP_NAME: Input your app name
              // YOUR_APP_SDK_TOKEN: Input your app token
              val option = AirbridgeOptionBuilder("YOUR_APP_NAME", "YOUR_APP_SDK_TOKEN")
                  .build()
              Airbridge.initializeSDK(this, option)
          }
      }
      ```

      ```java Java lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      import android.app.Application;

      import co.ab180.airbridge.Airbridge;
      import co.ab180.airbridge.AirbridgeOption;
      import co.ab180.airbridge.AirbridgeOptionBuilder;

      public class MainApplication extends Application {
          @Override
          public void onCreate() {
              super.onCreate();
              // YOUR_APP_NAME: Input your app name
              // YOUR_APP_SDK_TOKEN: Input your app token
              AirbridgeOption option = new AirbridgeOptionBuilder("YOUR_APP_NAME", "YOUR_APP_SDK_TOKEN")
                  .build();
              Airbridge.initializeSDK(this, option);
          }
      }
      ```
    </CodeGroup>

    <Note>
      **Attention**

      Starting from Airbridge Android SDK 4.9.0, backup rule configuration is not required. Only refer to the [backup rule configuration](/en/developers/troubleshooting-android-sdk-v4#airbridge-sdk-backup-rule-configuration-sdk-below-4-9-0) in the troubleshooting guide if you are using a version below 4.9.0.
    </Note>

    ### Deep linking setup

    Follow the instructions below and complete the setup for all the items below.

    #### Enable app launch with Airbridge Deep Links

    Create an Activity class to handle deep links and add it to the `AndroidManifest.xml`. Then, add the 3 types of Airbridge Deep Links to the intent filter. When a tracking link is triggered, Airbridge will launch the app with the most appropriate type of Airbridge Deep Link depending on the browser and whether the app is installed on the user's device.

    `YOUR_SCHEME` should be the URI scheme you submitted to the \[Tracking Links]>\[Deep Links] page in the Airbridge dashboard, without the `://`.

    The `YOUR_APP_NAME` and `YOUR_APP_SDK_TOKEN` can be found on the \[Settings]>\[Tokens] page in the Airbridge dashboard.

    ```xml AndroidManifest.xml lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
    <application ...>
        ...
        <activity android:name=".DeeplinkActivity" ...>
            ...
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <!-- YOUR_SCHEME: Input your Android URI Scheme -->
                <data android:scheme="YOUR_SCHEME" />
            </intent-filter>
            <intent-filter android:autoVerify="true">
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <!-- YOUR_APP_NAME: Input your App Name -->
                <data android:scheme="http" android:host="YOUR_APP_NAME.abr.ge" />
                <data android:scheme="https" android:host="YOUR_APP_NAME.abr.ge" />
            </intent-filter>
            <intent-filter android:autoVerify="true">
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <!-- YOUR_APP_NAME: Input your App Name -->
                <data android:scheme="http" android:host="YOUR_APP_NAME.airbridge.io" />
                <data android:scheme="https" android:host="YOUR_APP_NAME.airbridge.io" />
            </intent-filter>
            ...
        </activity>
        ...
    </application>
    ```

    #### Redirect users with Airbridge Deep Links

    In the `onResume` function of the deep link handling Activity class, call the `handleDeeplink` function to convert the Airbridge Deep Link into the deep link set in the tracking link. Also, make sure the user is redirected to the intended in-app location using the converted scheme deep link.

    If the app is launched via an Airbridge Deep Link, `isAirbridgeDeeplink` returns `true`, and the configured deep link will be passed to the `URI` of the callback function.

    If the app is launched by a deep link that is not from Airbridge, `isAirbridgeDeeplink` returns `false`, and the callback function will not be called.

    <CodeGroup>
      ```kotlin Kotlin lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      import android.content.Intent
      import androidx.appcompat.app.AppCompatActivity
      import co.ab180.airbridge.Airbridge

      class DeeplinkActivity: AppCompatActivity() {
          override fun onResume() {
              super.onResume()
              val isAirbridgeDeeplink = Airbridge.handleDeeplink(intent) { uri ->
                  // when app is opened with airbridge deeplink
                  // show proper content using url (YOUR_SCHEME://...)
              }
              if (isAirbridgeDeeplink) return
              // when app is opened with other deeplink
              // use existing logic as it is
          }

          override fun onNewIntent(intent: Intent) {
              super.onNewIntent(intent)
              setIntent(intent)
          }
      }
      ```

      ```java Java lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      import android.content.Intent;
      import androidx.appcompat.app.AppCompatActivity;
      import co.ab180.airbridge.Airbridge;

      public class DeeplinkActivity extends AppCompatActivity {
          @Override
          protected void onResume() {
              super.onResume();
              boolean isAirbridgeDeeplink = Airbridge.handleDeeplink(getIntent(), uri -> {
                  // when app is opened with airbridge deeplink
                  // show proper content using url (YOUR_SCHEME://...)
              });
              if (isAirbridgeDeeplink) return;
              // when app is opened with other deeplink
              // use existing logic as it is
          }

          @Override
          protected void onNewIntent(Intent intent) {
              super.onNewIntent(intent);
              setIntent(intent);
          }
      }
      ```
    </CodeGroup>

    #### Redirect users through deferred deep linking

    When a user who hasn't installed the app clicks on a tracking link with a deep link set as the user destination, they can be redirected to the app store to prompt app install. After the user installs and launches the app, you can call the `handleDeferredDeeplink` function at the appropriate moment to obtain the deep link set in the tracking link. Ensure the user is redirected to the intended in-app location using the obtained deep link.

    The first time `handleDeferredDeeplink` is called after app installation, it returns `true`, and the deep link from the tracking link is passed as a parameter to the callback function.

    If `handleDeferredDeeplink` is called again after the initial call, it returns `false`, and the callback function will not be invoked.

    <CodeGroup>
      ```kotlin Kotlin lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      import android.os.Bundle
      import androidx.appcompat.app.AppCompatActivity
      import co.ab180.airbridge.Airbridge

      class MainActivity: AppCompatActivity() {
          override fun onCreate(savedInstanceState: Bundle?) {
              super.onCreate(savedInstanceState)
              val isFirstCalled = Airbridge.handleDeferredDeeplink { uri ->
                  // when handleDeferredDeeplink is called firstly after install
                  if (uri != null) {
                      // show proper content using uri (YOUR_SCHEME://...)
                  }
              }
              if (isFirstCalled) return
              // when handleDeferredDeeplink is called secondly or later after install
              // use existing logic as it is
          }
      }
      ```

      ```java Java lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      import android.os.Bundle;
      import androidx.annotation.Nullable;
      import androidx.appcompat.app.AppCompatActivity;
      import co.ab180.airbridge.Airbridge;

      public class MainActivity extends AppCompatActivity {
          @Override
          protected void onCreate(@Nullable Bundle savedInstanceState) {
              super.onCreate(savedInstanceState);
              boolean isFirstCalled = Airbridge.handleDeferredDeeplink(uri -> {
                  // when app is opened with airbridge deeplink
                  if (uri != null) {
                      // show proper content using uri (YOUR_SCHEME://...)
                  }
              });
              if (isFirstCalled) return;
              // when app is opened with other deeplink
              // use existing logic as it is
          }
      }
      ```
    </CodeGroup>

    <Danger>
      **Attention**

      When the app is opened via a deep link, Airbridge passes null to onSuccess regardless of whether a deferred deep link exists or not, ensuring that only the deep link is processed.
    </Danger>
  </Accordion>

  <Accordion title="iOS SDK">
    ### SDK setup

    Install the Airbridge iOS SDK.

    <Tabs>
      <Tab title="SwiftPackageManager">
        1. Navigate to **\[File]>\[Add Packages...]** in Xcode.

        2. Enter the following address into the search bar and click **Add Package**.
           * [https://github.com/ab180/airbridge-ios-sdk-deployment](https://github.com/ab180/airbridge-ios-sdk-deployment)

        3. Click **Add** **Package** again.

        4. The Airbridge iOS SDK will be added to **Package Dependencies**.
      </Tab>

      <Tab title="CocoaPods">
        <Danger>
          **Attention**

          Before installing the iOS SDK, navigate to **\[YOUR\_PROJECT]>\[Build Settings]** in your Xcode and make sure to set the **User Script Sandboxing** to "No." For more details, refer to the [CocoaPods document](https://github.com/CocoaPods/CocoaPods/issues/11946).
        </Danger>

        1. Install CocoaPods with `brew install cocoapods`.
        2. Create a Podfile with `pod init`.
        3. Add the SDK as a dependency with the code below in the Podfile. Check the latest SDK version from [this page](/en/developers/release-note-ios-sdk) and replace `$HERE_LATEST_VERSION` with the latest version number.

        ```ruby Podfile lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
        target '[Project Name]' do
            ...
            # Replace $HERE_LATEST_VERSION with latest version
            # - Versions: https://help.airbridge.io/developers/release-note-ios-sdk
            # - Example: pod 'airbridge-ios-sdk', '4.X.X'
            pod 'airbridge-ios-sdk', '$HERE_LATEST_VERSION'
            ...
        end
        ```

        4. The installation will start when you enter `pod install --repo-update`.
        5. Run `YOUR_PROJECT.xcworkspace` to verify that the Airbridge iOS SDK is successfully installed.
      </Tab>

      <Tab title="Tuist">
        <Danger>
          **Attention**

          You cannot install the Airbridge iOS SDK with Tuist's[ XcodeProj-based integration](https://docs.tuist.dev/en/guides/develop/projects/dependencies#tuists-xcodeprojbased-integration). Make sure to install the iOS SDK through [Xcode's default integration](https://docs.tuist.dev/en/guides/develop/projects/dependencies#xcodes-default-integration).
        </Danger>

        1. Run the `tuist edit` command.
        2. Add `remote` to `project.packages`. Add SDK as `package` to `project.targets[...].target.dependencies` and the dependency framework as `sdk`. Then Check the latest SDK version from [this page](/en/developers/release-note-ios-sdk) and replace `$HERE_LATEST_VERSION` with the latest version number. For the dependency framework list, refer to the table below.

        | Framework                         | Description                                                |
        | --------------------------------- | ---------------------------------------------------------- |
        | AdSupport.framework               | Used for IDFA collection                                   |
        | CoreTelephony.framework           | Used for carrier information collection                    |
        | StoreKit.framework                | Used for SKAdNetwork data collection                       |
        | AppTrackingTransparency.framework | Used for user consent information collection               |
        | AdServices.framework              | Used for Apple Ads attribution data collection (iOS 14.3+) |
        | WebKit.framework                  | Used for event collection through web SDK integration      |

        ```swift lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
        import ProjectDescription

        let project = Project(
            packages: [
                .remote(
                    url: "https://github.com/ab180/airbridge-ios-sdk-deployment",
                    // Replace $HERE_LATEST_VERSION with latest version
                    // - Versions: https://help.airbridge.io/developers/release-note-ios-sdk
                    // - Example: requirement: .exact(from: "4.X.X")
                    requirement: .exact(from: "$HERE_LATEST_VERSION")
                ),
                ...
            ],
            targets: [
                .target(
                    dependencies: [
                        .package(product: "Airbridge", type: .runtime),
                        .sdk(name: "AdSupport", type: .framework, status: .optional),
                        .sdk(name: "AdServices", type: .framework, status: .optional),
                        .sdk(name: "CoreTelephony", type: .framework, status: .optional),
                        .sdk(name: "StoreKit", type: .framework, status: .optional),
                        .sdk(name: "AppTrackingTransparency", type: .framework, status: .optional),
                        .sdk(name: "WebKit", type: .framework, status: .optional),
                        ...
                    ]
                ),
                ...
            ],
            ...
        )
        ```

        3. Run the `tuist generate` command.
        4. Airbridge is added to the Package Dependencies in Xcode.
      </Tab>

      <Tab title="Manual install">
        1. Download the Airbridge iOS SDK from the link below.
           * [https://sdk-download.airbridge.io/airbridge-ios-sdk/latest/Airbridge.zip](https://sdk-download.airbridge.io/airbridge-ios-sdk/latest/Airbridge.zip)

        2. Add **Airbridge.xcframework** to your project. Navigate to **\[Project File]>\[General]>\[Frameworks, Libraries, and Embedded Content]** in Xcode and click **+**.

        3. Click **Add Files...** under **\[Add Other...]** and select **Airbridge.xcframework**.

        4. Set the **Embed** of **Airbridge.xcframework** to "Embed & Sign".
      </Tab>
    </Tabs>

    ### SDK initialization

    Initialize the SDK by referring to the code below.

    <CodeGroup>
      ```swift SceneDelegate (Swift) lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      import UIKit
      import Airbridge

      @main
      class AppDelegate: UIResponder, UIApplicationDelegate {
          func application(
              _ application: UIApplication,
              didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
          ) -> Bool {
              let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
                  .build()
              Airbridge.initializeSDK(option: option)
              return true
          }
      }
      ```

      ```swift AppDelegate (Swift) lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      import UIKit
      import Airbridge

      @main
      class AppDelegate: UIResponder, UIApplicationDelegate {
          func application(
              _ application: UIApplication,
              didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
          ) -> Bool {
              let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
                  .build()
              Airbridge.initializeSDK(option: option)
              return true
          }
      }
      ```

      ```swift SwiftUI (Swift) lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      import SwiftUI
      import Airbridge

      @main
      struct ExampleApp: App {
          init() {
              let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
                  .build()
              Airbridge.initializeSDK(option: option)
          }
      }
      ```

      ```objective-c SceneDelegate (Objective-C) lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      #import "AppDelegate.h"
      #import <Airbridge/Airbridge.h>

      @interface AppDelegate ()

      @end

      @implementation AppDelegate

      - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
          AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
                                                                                         token:@"YOUR_APP_SDK_TOKEN"];
          AirbridgeOption* option = [optionBuilder build];
          [Airbridge initializeSDKWithOption:option];
          return YES;
      }

      @end
      ```

      ```objective-c AppDelegate (Objective-C) lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      #import "AppDelegate.h"
      #import <Airbridge/Airbridge.h>

      @interface AppDelegate ()

      @end

      @implementation AppDelegate

      - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
          AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
                                                                                         token:@"YOUR_APP_SDK_TOKEN"];
          AirbridgeOption* option = [optionBuilder build];
          [Airbridge initializeSDKWithOption:option];
          return YES;
      }

      @end
      ```
    </CodeGroup>

    The `YOUR_APP_NAME` and `YOUR_APP_SDK_TOKEN` can be found on the \[Settings]>\[Tokens] page in the Airbridge dashboard.

    ### ATT prompt setup

    The SDK does not collect install events or trigger deferred deep linking until the user has responded to the ATT prompt.

    You can configure a timeout for the user response on the ATT prompt using the `setAutoDetermineTrackingAuthorizationTimeout` function. If the user does not respond within the specified timeout period, the install event will be collected, and deferred deep linking will be enabled regardless of the ATT prompt response. The default timeout value is 30 seconds.

    The Airbridge DeepLink Plan does not support attribution using identifiers. Therefore, to ensure that users who haven't installed the app are directed to the intended destination through deferred deep linking without delay, set the `setAutoDetermineTrackingAuthorizationTimeout` value to 0 seconds.

    <CodeGroup>
      ```swift Swift lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      import Airbridge
      ...
      let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME",
                                          token: "YOUR_APP_SDK_TOKEN")
          .setAutoDetermineTrackingAuthorizationTimeout(second: 0)
          .build()
      Airbridge.initializeSDK(option: option)
      ```

      ```objective-c Objective-C lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      #import <Airbridge/Airbridge.h>
      ...
      AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
                                                                                     token:@"YOUR_APP_SDK_TOKEN"];
      [optionBuilder setAutoDetermineTrackingAuthorizationTimeoutWithSecond:0];
      AirbridgeOption* option = [optionBuilder build];
      [Airbridge initializeSDKWithOption:option];
      ```
    </CodeGroup>

    ### Deep linking setup

    Follow the instructions below and complete the setup for all the items below.

    #### Enable app launch with deep links

    Complete the scheme deep link app setup and universal link app setup by referring to the code below.

    When a tracking link is triggered, Airbridge will launch the app with the most appropriate type of Airbridge Deep Link depending on the browser and whether the app is installed on the user's device.

    <Tabs>
      <Tab title="Xcode">
        **Scheme deep link setup in the app**

        In Xcode, go to **\[YOUR\_PROJECT]>\[Info]>\[URL Types]**. Then, click “+” and enter `YOUR_SCHEME`.

        **Universal Link setup in the app**

        In Xcode, go to **\[YOUR\_PROJECT]>\[Signing & Capabilities]**. Then, click “+ Capability” and select “Associated Domains”. Lastly, add `applinks:YOUR_APP_NAME.airbridge.io` and `applinks:YOUR_APP_NAME.abr.ge`.
      </Tab>
    </Tabs>

    `YOUR_SCHEME` should be the URI scheme you submitted to the \[Tracking Links]>\[Deep Links] page in the Airbridge dashboard, without `://`.

    The `YOUR_APP_NAME` and `YOUR_APP_SDK_TOKEN` can be found on the \[Settings]>\[Tokens] page in the Airbridge dashboard.

    #### Redirect users with Airbridge Deep Links

    When the app opens with a deep link, call the `trackDeeplink` function to collect the Deeplink Open event. Then call the `handleDeeplink` function to retrieve the deep link set in the tracking link. Also, make sure the user is redirected to the intended in-app location using the converted scheme deep link.

    If the app is launched via an Airbridge Deep Link, `handleDeeplink` returns `true`, and the configured deep link will be passed to the `URI` of the callback function.

    If the app is launched by a deep link that is not from Airbridge, `handleDeeplink` returns `false`, and the callback function will not be called.

    <CodeGroup>
      ```swift SceneDelegate (Swift) lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      import UIKit
      import Airbridge

      @main
      class SceneDelegate: UIResponder, UIWindowSceneDelegate {
          // when app is opened with airbridge deeplink
          func handleAirbridgeDeeplink(url: URL) {
              // show proper content using url (YOUR_SCHEME://...)
          }

          // when terminated app is opened with scheme deeplink or universal links
          func scene(
              _ scene: UIScene,
              willConnectTo session: UISceneSession,
              options connectionOptions: UIScene.ConnectionOptions
          ) {
              // when app is opened with scheme deeplink
              if let url = connectionOptions.urlContexts.first?.url {
                  // track deeplink
                  Airbridge.trackDeeplink(url: url)
                  // handle deeplink
                  var isAirbridgeDeeplink = Airbridge.handleDeeplink(url: url) { url in
                      // when app is opened with airbridge deeplink
                      // show proper content using url (YOUR_SCHEME://...)
                      handleAirbridgeDeeplink(url: url)
                  }
                  if isAirbridgeDeeplink { return }
                  // when app is opened with other deeplink
                  // use existing logic as it is
              }
              // when app is opened with universal links
              else if let userActivity = connectionOptions.userActivities.first {
                  // track deeplink
                  Airbridge.trackDeeplink(userActivity: userActivity)
                  // handle deeplink
                  var isAirbridgeDeeplink = Airbridge.handleDeeplink(userActivity: userActivity) { url in
                      // when app is opened with airbridge deeplink
                      // show proper content using url (YOUR_SCHEME://...)
                      handleAirbridgeDeeplink(url: url)
                  }
                  if isAirbridgeDeeplink { return }
                  // when app is opened with other deeplink
                  // use existing logic as it is
              }
          }

          // when backgrounded app is opened with scheme deeplink
          func scene(
              _ scene: UIScene,
              openURLContexts URLContexts: Set<UIOpenURLContext>
          ) {
              guard let url = URLContexts.first?.url else { return }
              // track deeplink
              Airbridge.trackDeeplink(url: url)
              // handle deeplink
              var isAirbridgeDeeplink = Airbridge.handleDeeplink(url: url) { url in
                  // when app is opened with airbridge deeplink
                  // show proper content using url (YOUR_SCHEME://...)
                  handleAirbridgeDeeplink(url: url)
              }
              if isAirbridgeDeeplink { return }
              // when app is opened with other deeplink
              // use existing logic as it is
          }

          // when backgrounded app is opened with universal links
          func scene(
              _ scene: UIScene,
              continue userActivity: NSUserActivity
          ) {
              // track deeplink
              Airbridge.trackDeeplink(userActivity: userActivity)
              // handle deeplink
              var isAirbridgeDeeplink = Airbridge.handleDeeplink(userActivity: userActivity) { url in
                  // when app is opened with airbridge deeplink
                  // show proper content using url (YOUR_SCHEME://...)
                  handleAirbridgeDeeplink(url: url)
              }
              if isAirbridgeDeeplink { return }
              // when app is opened with other deeplink
              // use existing logic as it is
          }
      }
      ```

      ```swift AppDelegate (Swift) lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      import UIKit
      import Airbridge

      @main
      class AppDelegate: UIResponder, UIApplicationDelegate {
          // when app is opened with airbridge deeplink
          func handleAirbridgeDeeplink(url: URL) {
              // show proper content using url (YOUR_SCHEME://...)
          }

          // when app is opened with scheme deeplink
          func application(
              _ app: UIApplication,
              open url: URL,
              options: [UIApplication.OpenURLOptionsKey : Any] = [:]
          ) -> Bool {
              // track deeplink
              Airbridge.trackDeeplink(url: url)
              // handle deeplink
              var isAirbridgeDeeplink = Airbridge.handleDeeplink(url: url) { url in
                  // when app is opened with airbridge deeplink
                  // show proper content using url (YOUR_SCHEME://...)
                  handleAirbridgeDeeplink(url: url)
              }
              if isAirbridgeDeeplink { return true }
              // when app is opened with other deeplink
              // use existing logic as it is
              return isAirbridgeDeeplink
          }

          // when app is opened with universal links
          func application(
              _ application: UIApplication,
              continue userActivity: NSUserActivity,
              restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void
          ) -> Bool {
              // track deeplink
              Airbridge.trackDeeplink(userActivity: userActivity)
              // handle deeplink
              var isAirbridgeDeeplink = Airbridge.handleDeeplink(userActivity: userActivity) { url in
                  // when app is opened with airbridge deeplink
                  // show proper content using url (YOUR_SCHEME://...)
                  handleAirbridgeDeeplink(url: url)
              }
              if isAirbridgeDeeplink { return true }
              // when app is opened with other deeplink
              // use existing logic as it is
              return isAirbridgeDeeplink
          }
      }
      ```

      ```swift SwiftUI (Swift) lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      import SwiftUI
      import Airbridge

      @main
      struct ActualApp: App {
          var body: some Scene {
              WindowGroup {
                  ContentView()
                      // when app is opened with scheme deeplink or universal links
                      .onOpenURL { url in
                          // track deeplink
                          Airbridge.trackDeeplink(url: url)
                          // handle deeplink
                          var isAirbridgeDeeplink = Airbridge.handleDeeplink(url: url) { url in
                              // when app is opened with airbridge deeplink
                              // show proper content using url (YOUR_SCHEME://...)
                          }
                          if isAirbridgeDeeplink { return }
                          // when app is opened with other deeplink
                          // use existing logic as it is
                      }
              }
          }
      }
      ```

      ```objective-c SceneDelegate (Objective-C) lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      #import "AppDelegate.h"
      #import <Airbridge/Airbridge.h>

      @interface SceneDelegate ()

      @end

      @implementation SceneDelegate

      // when app is opened with airbridge deeplink
      - (void)handleAirbridgeDeeplink:(NSURL *)url {
          // show proper content using url (YOUR_SCHEME://...)
      }

      // when terminated app is opened with scheme deeplink or universal links
      - (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions {
          // when app is opened with scheme deeplink
          NSURL* url = connectionOptions.URLContexts.allObjects.firstObject.URL;
          NSUserActivity* userActivity = connectionOptions.userActivities.allObjects.firstObject;
          if (url != nil) {
              // track deeplink
              [Airbridge trackDeeplinkWithUrl:url];
              // handle deeplink
              BOOL isAirbridgeDeeplink = [Airbridge handleDeeplinkWithUrl:url onSuccess:^(NSURL* url) {
                  // when app is opened with airbridge deeplink
                  // show proper content using url (YOUR_SCHEME://...)
                  [self handleAirbridgeDeeplink:url];
              }];
              if (isAirbridgeDeeplink) { return; }
              // when app is opened with other deeplink
              // use existing logic as it is
          }
          else if (userActivity != nil) {
              // track deeplink
              [Airbridge trackDeeplinkWithUserActivity:userActivity];
              // handle deeplink
              BOOL isAirbridgeDeeplink = [Airbridge handleDeeplinkWithUserActivity:userActivity onSuccess:^(NSURL* url) {
                  // when app is opened with airbridge deeplink
                  // show proper content using url (YOUR_SCHEME://...)
                  [self handleAirbridgeDeeplink:url];
              }];
              if (isAirbridgeDeeplink) { return; }
              // when app is opened with other deeplink
              // use existing logic as it is
          }
      }

      // when backgrounded app is opened with scheme deeplink
      - (void)scene:(UIScene *)scene openURLContexts:(NSSet<UIOpenURLContext *> *)URLContexts {
          NSURL* url = URLContexts.allObjects.firstObject.URL;
          if (url == nil) { return; }
          // track deeplink
          [Airbridge trackDeeplinkWithUrl:url];
          // handle deeplink
          BOOL isAirbridgeDeeplink = [Airbridge handleDeeplinkWithUrl:url onSuccess:^(NSURL* url) {
              // when app is opened with airbridge deeplink
              // show proper content using url (YOUR_SCHEME://...)
              [self handleAirbridgeDeeplink:url];
          }];
          if (isAirbridgeDeeplink) { return; }
          // when app is opened with other deeplink
          // use existing logic as it is
      }

      // when backgrounded app is opened with universal links
      - (void)scene:(UIScene *)scene continueUserActivity:(NSUserActivity *)userActivity {
          // track deeplink
          [Airbridge trackDeeplinkWithUserActivity:userActivity];
          // handle deeplink
          BOOL isAirbridgeDeeplink = [Airbridge handleDeeplinkWithUserActivity:userActivity onSuccess:^(NSURL* url) {
              // when app is opened with airbridge deeplink
              // show proper content using url (YOUR_SCHEME://...)
              [self handleAirbridgeDeeplink:url];
          }];
          if (isAirbridgeDeeplink) { return; }
          // when app is opened with other deeplink
          // use existing logic as it is
      }

      @end
      ```

      ```objective-c AppDelegate (Objective-C) lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      #import "AppDelegate.h"
      #import <Airbridge/Airbridge.h>

      @interface AppDelegate ()

      @end

      @implementation AppDelegate

      // when app is opened with airbridge deeplink
      - (void)handleAirbridgeDeeplink:(NSURL *)url {
          // show proper content using url (YOUR_SCHEME://...)
      }

      // when app is opened with scheme deeplink
      - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
          // track deeplink
          [Airbridge trackDeeplinkWithUrl:url];
          // handle deeplink
          BOOL isAirbridgeDeeplink = [Airbridge handleDeeplinkWithUrl:url onSuccess:^(NSURL* url) {
              // when app is opened with airbridge deeplink
              // show proper content using url (YOUR_SCHEME://...)
              [self handleAirbridgeDeeplink:url];
          }];
          if (isAirbridgeDeeplink) { return YES; }
          // when app is opened with other deeplink
          // use existing logic as it is
          return isAirbridgeDeeplink;
      }

      // when app is opened with universal links
      - (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler {
          // track deeplink
          [Airbridge trackDeeplinkWithUserActivity:userActivity];
          // handle deeplink
          BOOL isAirbridgeDeeplink = [Airbridge handleDeeplinkWithUserActivity:userActivity onSuccess:^(NSURL* url) {
              // when app is opened with airbridge deeplink
              // show proper content using url (YOUR_SCHEME://...)
              [self handleAirbridgeDeeplink:url];
          }];
          if (isAirbridgeDeeplink) { return YES; }
          // when app is opened with other deeplink
          // use existing logic as it is
          return isAirbridgeDeeplink;
      }

      @end
      ```
    </CodeGroup>

    #### Redirect users through deferred deep linking

    When a user who hasn't installed the app clicks on a tracking link with a deep link set as the user destination, they can be redirected to the app store to prompt app install. After the user installs and launches the app, you can call the `handleDeferredDeeplink` function at the appropriate moment to obtain the deep link set in the tracking link. Ensure the user is redirected to the intended in-app location using the obtained deep link.

    The first time `handleDeferredDeeplink` is called after app installation, it returns `true`, and the deep link from the tracking link is passed as a parameter to the callback function.

    If `handleDeferredDeeplink` is called again after the initial call, it returns `false`, and the callback function will not be invoked.

    <CodeGroup>
      ```swift SceneDelegate (Swift) lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      import UIKit
      import Airbridge

      @main
      class AppDelegate: UIResponder, UIApplicationDelegate {
          func application(
              _ application: UIApplication,
              didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
          ) -> Bool {
              let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
                  .build()
              Airbridge.initializeSDK(option: option)
              let isFirstCalled = Airbridge.handleDeferredDeeplink() { url in
                  // when handleDeferredDeeplink is called firstly after install
                  if let url {
                      // show `proper content using url (YOUR_SCHEME://...)
                  }
              }
              if (isFirstCalled) { return true }
              // when handleDeferredDeeplink is called secondly or later after install
              // use existing logic as it is
              return true
          }
      }
      ```

      ```swift AppDelegate (Swift) lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      import UIKit
      import Airbridge

      @main
      class AppDelegate: UIResponder, UIApplicationDelegate {
          func application(
              _ application: UIApplication,
              didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
          ) -> Bool {
              let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
                  .build()
              Airbridge.initializeSDK(option: option)
              let isFirstCalled = Airbridge.handleDeferredDeeplink() { url in
                  // when handleDeferredDeeplink is called firstly after install
                  if let url {
                      // show `proper content using url (YOUR_SCHEME://...)
                  }
              }
              if (isFirstCalled) { return true }
              // when handleDeferredDeeplink is called secondly or later after install
              // use existing logic as it is
              return true
          }
      }
      ```

      ```swift SwiftUI (Swift) lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      import SwiftUI
      import Airbridge

      @main
      struct ExampleApp: App {
          init() {
              let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
                  .build()
              Airbridge.initializeSDK(option: option)
              let isFirstCalled = Airbridge.handleDeferredDeeplink() { url in
                  // when handleDeferredDeeplink is called firstly after install
                  if let url {
                      // show `proper content using url (YOUR_SCHEME://...)
                  }
              }
              if (isFirstCalled) { return true }
              // when handleDeferredDeeplink is called secondly or later after install
              // use existing logic as it is
          }
      }
      ```

      ```objective-c SceneDelegate (Objective-C) lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      #import "AppDelegate.h"
      #import <Airbridge/Airbridge.h>

      @interface AppDelegate ()

      @end

      @implementation AppDelegate

      - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
          AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
                                                                                         token:@"YOUR_APP_SDK_TOKEN"];
          AirbridgeOption* option = [optionBuilder build];
          [Airbridge initializeSDKWithOption:option];
          BOOL isFirstCalled = [Airbridge handleDeferredDeeplinkOnSuccess:^(NSURL* url) {
              // when handleDeferredDeeplink is called firstly after install
              if (url != nil) {
                  // show `proper content using url (YOUR_SCHEME://...)
              }
          }];
          if (isFirstCalled) { return YES; }
          // when handleDeferredDeeplink is called secondly or later after install
          // use existing logic as it is
          return YES;
      }

      @end
      ```

      ```objective-c AppDelegate (Objective-C) lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      #import "AppDelegate.h"
      #import <Airbridge/Airbridge.h>

      @interface AppDelegate ()

      @end

      @implementation AppDelegate

      - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
          AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
                                                                                         token:@"YOUR_APP_SDK_TOKEN"];
          AirbridgeOption* option = [optionBuilder build];
          [Airbridge initializeSDKWithOption:option];
          BOOL isFirstCalled = [Airbridge handleDeferredDeeplinkOnSuccess:^(NSURL* url) {
              // when handleDeferredDeeplink is called firstly after install
              if (url != nil) {
                  // show `proper content using url (YOUR_SCHEME://...)
              }
          }];
          if (isFirstCalled) { return YES; }
          // when handleDeferredDeeplink is called secondly or later after install
          // use existing logic as it is
          return YES;
      }

      @end
      ```
    </CodeGroup>

    <Danger>
      **Attention**

      When the app is opened via a deep link, Airbridge passes null to onSuccess regardless of whether a deferred deep link exists or not, ensuring that only the deep link is processed.
    </Danger>
  </Accordion>

  <Accordion title="React Native SDK">
    ### SDK installation

    Install the Airbridge React Native SDK.

    <CodeGroup>
      ```bash npm lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      npm install airbridge-react-native-sdk
      cd ios; pod install
      ```
    </CodeGroup>

    ### SDK initialization

    Initialize the SDK when the app is opened.

    The `YOUR_APP_NAME` and `YOUR_APP_SDK_TOKEN` can be found on the \[Settings]>\[Tokens] page in the Airbridge dashboard.

    **`ios/YOUR_PROJECT_NAME/AppDelegate.m`** **file**

    <CodeGroup>
      ```swift Swift lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      import AirbridgeReactNative
      ...
      func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
          AirbridgeReactNative.initializeSDK(name: "YOUR_APP_NAME", token:"YOUR_APP_SDK_TOKEN")
          ...
          return true
      }
      ```

      ```objective-c Objective-C lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      #import <AirbridgeReactNative/AirbridgeReactNative.h>
      ...
      - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
          [AirbridgeReactNative initializeSDKWithName:@"YOUR_APP_NAME" token:@"YOUR_APP_SDK_TOKEN"];
          ...
          return YES;
      }
      ```
    </CodeGroup>

    **`android/app/src/main/java/.../MainApplication.kt`** **file**

    <CodeGroup>
      ```kotlin Kotlin lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      import co.ab180.airbridge.reactnative.AirbridgeReactNative
      ...
      override fun onCreate() {
          super.onCreate()
          AirbridgeReactNative.initializeSDK(this, "YOUR_APP_NAME", "YOUR_APP_SDK_TOKEN")
          ...
      }
      ```

      ```java Java lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      import co.ab180.airbridge.reactnative.AirbridgeReactNative;
      ...
      @Override
      public void onCreate() {
          super.onCreate();
          AirbridgeReactNative.initializeSDK(this, "YOUR_APP_NAME", "YOUR_APP_SDK_TOKEN");
          ...
      }
      ```
    </CodeGroup>

    ### SDK setup

    Configure the SDK settings by following the steps below.

    ```json lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
    {
        "sdkEnabled": boolean,
        "logLevel": "debug" | "info" | "warning" | "error" | "fault",
        "autoStartTrackingEnabled": boolean,
        "autoDetermineTrackingAuthorizationTimeoutInSecond": number,
        "trackMetaDeferredAppLinkEnabled": boolean,
        "sessionTimeoutInSecond": number,
        "metaInstallReferrerAppID": string,
        "trackAirbridgeDeeplinkOnlyEnabled": boolean,
        "trackingLinkCustomDomains": [string],
        "hashUserInformationEnabled": boolean,
        "sdkSignatureID": string,
        "sdkSignatureSecret": string,
        "clearEventBufferOnInitializeEnabled": boolean,
        "eventBufferCountLimit": number,
        "eventBufferSizeLimitInGibibyte": number,
        "eventTransmitIntervalInSecond": number,
        "isHandleAirbridgeDeeplinkOnly": boolean,
        "collectTCFDataEnabled": boolean,
        "trackingBlocklist": [string],
        "calculateSKAdNetworkByServerEnabled": boolean
    }
    ```

    1. Create an airbridge.json file at the top level of the React Native project folder, input the JSON as above, and configure the SDK settings.
    2. Don't input values for keys that are not necessary for your service.

    <Note>
      **Attention**

      When issues arise due to **Airbridge SDK backup rule merge conflicts**, please refer to the [backup rule configuration](/en/developers/troubleshooting-react-native-sdk-v4#resolve-airbridge-sdk-backup-rules-merge-conflict-issue) in the troubleshooting guide.
    </Note>

    ### ATT prompt setup

    The SDK does not collect install events or trigger deferred deep linking until the user has responded to the ATT prompt.

    You can configure the timeout for the user's response to the ATT prompt using the `autoDetermineTrackingAuthorizationTimeoutInSecond` setting in `airbridge.json`.

    If the user does not respond within the specified timeout period, the install event will be collected, and deferred deep linking will be enabled regardless of the ATT prompt response. The default timeout value is 30 seconds.

    The Airbridge DeepLink Plan does not support attribution using identifiers. Therefore, to ensure that users who haven't installed the app are directed to the intended destination through deferred deep linking without delay, set the `autoDetermineTrackingAuthorizationTimeoutInSecond` value to 0 seconds.

    ```json lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
    {
        "autoDetermineTrackingAuthorizationTimeoutInSecond": 0
    }
    ```

    ### Deep linking setup

    Follow the instructions below and complete the setup for all the items below.

    #### Enable app launch with Airbridge Deep Links

    Complete the scheme deep link app setup and universal link app setup for iOS, and the scheme deep link app setup and app link setup for Android by referring to the codes below.

    When a tracking link is triggered, Airbridge will launch the app with the most appropriate type of Airbridge Deep Link depending on the browser and whether the app is installed on the user's device.

    **`ios/YOUR_PROJECT_NAME.xcodeproj`** **file**

    <Tabs>
      <Tab title="Xcode">
        **Scheme deep link setup in the app**

        In Xcode, go to **\[YOUR\_PROJECT]>\[Info]>\[URL Types]**. Then, click “+” and enter `YOUR_SCHEME`.

        **Universal Link setup in the app**

        In Xcode, go to **\[YOUR\_PROJECT]>\[Signing & Capabilities]**. Then, click “+ Capability” and select “Associated Domains”. Lastly, add `applinks:YOUR_APP_NAME.airbridge.io` and `applinks:YOUR_APP_NAME.abr.ge`.
      </Tab>
    </Tabs>

    **`android/app/src/main/AndroidManifest.xml`** **file**

    **Scheme deep link app setup**

    Add  `YOUR_SCHEME` to the `intent-filter`.

    **App link setup**

    Add `YOUR_APP_NAME.airbridge.io` and `YOUR_APP_NAME.abr.ge` to the `intent-filter`.

    ```xml AndroidManifest.xml lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
    <application ...>
        ...
        <activity android:name=".DeeplinkActivity" ...>
            ...
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <!-- YOUR_SCHEME: Input your Android URI Scheme -->
                <data android:scheme="YOUR_SCHEME" />
            </intent-filter>
            <intent-filter android:autoVerify="true">
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <!-- YOUR_APP_NAME: Input your App Name -->
                <data android:scheme="http" android:host="YOUR_APP_NAME.abr.ge" />
                <data android:scheme="https" android:host="YOUR_APP_NAME.abr.ge" />
            </intent-filter>
            <intent-filter android:autoVerify="true">
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <!-- YOUR_APP_NAME: Input your App Name -->
                <data android:scheme="http" android:host="YOUR_APP_NAME.airbridge.io" />
                <data android:scheme="https" android:host="YOUR_APP_NAME.airbridge.io" />
            </intent-filter>
            ...
        </activity>
        ...
    </application>
    ```

    `YOUR_SCHEME` should be the URI scheme you submitted to the \[Tracking Links]>\[Deep Links] page in the Airbridge dashboard, without the `://`.

    The `YOUR_APP_NAME` and `YOUR_APP_SDK_TOKEN` can be found on the \[Settings]>\[Tokens] page in the Airbridge dashboard.

    #### Redirect users with Airbridge Deep Links

    Call the `trackDeeplink` function when the app is opened through a deep link, so the SDK can collect the deep link event.

    **`ios/YOUR_PROJECT_NAME/AppDelegate.m`** **file**

    <CodeGroup>
      ```swift Swift lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      import AirbridgeReactNative
      ...
      // when app is opened with scheme deeplink
      func application(
          _ app: UIApplication,
          open url: URL,
          options: [UIApplication.OpenURLOptionsKey : Any] = [:]
      ) -> Bool {
          // track deeplink
          AirbridgeReactNative.trackDeeplink(url: url)

          return true
      }
      ...
      // when app is opened with universal links
      func application(
          _ application: UIApplication,
          continue userActivity: NSUserActivity,
          restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void
      ) -> Bool {
          // track deeplink
          AirbridgeReactNative.trackDeeplink(userActivity: userActivity)

          return true
      }
      ```

      ```objective-c Objective-C lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      #import <AirbridgeReactNative/AirbridgeReactNative.h>
      ...
      // when app is opened with scheme deeplink
      - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
          // track deeplink
          [AirbridgeReactNative trackDeeplinkWithUrl:url];
          return YES;
      }
      ...
      // when app is opened with universal links
      - (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler {
          // track deeplink
          [AirbridgeReactNative trackDeeplinkWithUserActivity:userActivity];
          return YES;
      }
      ```
    </CodeGroup>

    **`android/app/src/main/java/.../MainActivity.kt`** **file**

    <CodeGroup>
      ```kotlin Kotlin lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      import co.ab180.airbridge.reactnative.AirbridgeReactNative
      ...
      override fun onResume() {
          super.onResume()
          AirbridgeReactNative.trackDeeplink(intent)
      }
      ...
      override fun onNewIntent(intent: Intent) {
          super.onNewIntent(intent)
          setIntent(intent)
      }
      ```

      ```java Java lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      import co.ab180.airbridge.reactnative.AirbridgeReactNative;
      ...
      @Override
      protected void onResume() {
          super.onResume();
          AirbridgeReactNative.trackDeeplink(getIntent());
      }
      ...
      @Override
      public void onNewIntent(Intent intent) {
          super.onNewIntent(intent);
          setIntent(intent);
      }
      ```
    </CodeGroup>

    Call the `setOnDeeplinkReceived` function to retrieve the deep link set in the tracking link. Also, make sure the user is redirected to the intended in-app location using the converted scheme deep link.

    ```javascript lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
    import { Airbridge } from 'airbridge-react-native-sdk'
    ...
    Airbridge.setOnDeeplinkReceived((url) => {
        // show proper content using url
    })
    ```

    #### Redirect users through deferred deep linking

    No additional setup is required for deferred deep linking. When a user who hasn’t installed the app clicks a tracking link, they will be redirected to the app store, prompting them to install the app. After installation, when the user launches the app, the deep link set in the tracking link is automatically passed to the `OnDeeplinkReceived` function.
  </Accordion>

  <Accordion title="Flutter SDK">
    ### SDK installation

    Install the Airbridge Flutter SDK.

    Add the following line to the `dependencies` block in your `pubspec.yaml` file. Check the link below for the latest version and replace `$HERE_LATEST_VERSION` accordingly.

    * SDK version list: [link](https://pub.dev/packages/airbridge_flutter_sdk/versions)

    ```yaml lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
    dependencies:
      # Replace $HERE_LATEST_VERSION with latest version
      # - Versions: https://pub.dev/packages/airbridge_flutter_sdk/versions
      # - Example: airbridge_flutter_sdk: 0.0.0
      airbridge_flutter_sdk: $HERE_LATEST_VERSION
    ```

    From the root directory of your project, open the terminal and run the following command.

    Note that the Airbridge Flutter SDK only works with Flutter 1.20.0 or higher and Dart 2.12.0 or later.

    ```bash Shell lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
    flutter pub get
    ```

    ### SDK initialization

    Initialize the SDK when the app is opened.

    The `YOUR_APP_NAME` and `YOUR_APP_SDK_TOKEN` can be found on the \[Settings]>\[Tokens] page in the Airbridge dashboard.

    **`ios/YOUR_PROJECT_NAME/AppDelegate.m`** **파일**

    <CodeGroup>
      ```swift Swift lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      import airbridge_flutter_sdk
      ...
      func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
          AirbridgeFlutter.initializeSDK(name: "YOUR_APP_NAME", token:"YOUR_APP_SDK_TOKEN")
          ...
          return true
      }
      ```

      ```objective-c Objective-C lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      #import <AirbridgeFlutter/AirbridgeFlutter.h>
      ...
      - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
          [AirbridgeFlutter initializeSDKWithName:@"YOUR_APP_NAME" token:@"YOUR_APP_SDK_TOKEN"];
          ...
          return YES;
      }
      ```
    </CodeGroup>

    **`android/app/src/main/java/.../MainApplication.kt`** **파일**

    <CodeGroup>
      ```kotlin Kotlin lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      import co.ab180.airbridge.flutter.AirbridgeFlutter
      ...
      override fun onCreate() {
          super.onCreate()
          AirbridgeFlutter.initializeSDK(this, "YOUR_APP_NAME", "YOUR_APP_SDK_TOKEN")
          ...
      }
      ```

      ```java Java lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      import co.ab180.airbridge.flutter.AirbridgeFlutter;
      ...
      @Override
      public void onCreate() {
          super.onCreate();
          AirbridgeFlutter.initializeSDK(this, "YOUR_APP_NAME", "YOUR_APP_SDK_TOKEN");
          ...
      }
      ```
    </CodeGroup>

    ### SDK setup

    Configure the SDK settings by following the steps below.

    ```json lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
    {
        "sdkEnabled": boolean,
        "logLevel": "debug" | "info" | "warning" | "error" | "fault",
        "autoStartTrackingEnabled": boolean,
        "autoDetermineTrackingAuthorizationTimeoutInSecond": number,
        "trackMetaDeferredAppLinkEnabled": boolean,
        "sessionTimeoutInSecond": number,
        "metaInstallReferrerAppID": string,
        "trackAirbridgeDeeplinkOnlyEnabled": boolean,
        "trackingLinkCustomDomains": [string],
        "hashUserInformationEnabled": boolean,
        "sdkSignatureID": string,
        "sdkSignatureSecret": string,
        "clearEventBufferOnInitializeEnabled": boolean,
        "eventBufferCountLimit": number,
        "eventBufferSizeLimitInGibibyte": number,
        "eventTransmitIntervalInSecond": number,
        "isHandleAirbridgeDeeplinkOnly": boolean,
        "collectTCFDataEnabled": boolean,
        "trackingBlocklist": [string],
        "calculateSKAdNetworkByServerEnabled": boolean
    }
    ```

    1. Create an airbridge.json file at the top level of the project folder, input the JSON as above, and configure the SDK settings.
    2. Don't input values for keys that are not necessary for your service.

    <Note>
      **Attention**

      When issues arise due to **Airbridge SDK backup rule merge conflicts**, please refer to the [backup rule configuration](/en/developers/troubleshooting-flutter-sdk-v4#resolve-airbridge-sdk-backup-rules-merge-conflict-issue) in the troubleshooting guide.
    </Note>

    ### ATT prompt setup

    The SDK does not collect install events or trigger deferred deep linking until the user has responded to the ATT prompt.

    You can configure the timeout for the user's response to the ATT prompt using the `autoDetermineTrackingAuthorizationTimeoutInSecond` setting in `airbridge.json`.

    If the user does not respond within the specified timeout period, the install event will be collected, and deferred deep linking will be enabled regardless of the ATT prompt response. The default timeout value is 30 seconds.

    The Airbridge DeepLink Plan does not support attribution using identifiers. Therefore, to ensure that users who haven't installed the app are directed to the intended destination through deferred deep linking without delay, set the `autoDetermineTrackingAuthorizationTimeoutInSecond` value to 0 seconds.

    ```json lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
    {
        "autoDetermineTrackingAuthorizationTimeoutInSecond": 0
    }
    ```

    ### Deep linking setup

    Follow the instructions below and complete the setup for all the items below.

    #### Enable app launch with Airbridge Deep Links

    Complete the scheme deep link app setup and universal link app setup for iOS, and the scheme deep link app setup and app link setup for Android by referring to the codes below.

    When a tracking link is triggered, Airbridge will launch the app with the most appropriate type of Airbridge Deep Link depending on the browser and whether the app is installed on the user's device.

    **`ios/YOUR_PROJECT_NAME.xcodeproj`** **file**

    <Tabs>
      <Tab title="Xcode">
        **Scheme deep link setup in the app**

        In Xcode, go to **\[YOUR\_PROJECT]>\[Info]>\[URL Types]**. Then, click “+” and enter `YOUR_SCHEME`.

        **Universal Link setup in the app**

        In Xcode, go to **\[YOUR\_PROJECT]>\[Signing & Capabilities]**. Then, click “+ Capability” and select “Associated Domains”. Lastly, add `applinks:YOUR_APP_NAME.airbridge.io` and `applinks:YOUR_APP_NAME.abr.ge`.
      </Tab>
    </Tabs>

    **`android/app/src/main/AndroidManifest.xml`** **file**

    **Scheme deep link app setup**

    Add  `YOUR_SCHEME` to the `intent-filter`.

    **App link setup**

    Add `YOUR_APP_NAME.airbridge.io` and `YOUR_APP_NAME.abr.ge` to the `intent-filter`.

    ```xml AndroidManifest.xml lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
    <application ...>
        ...
        <activity android:name=".DeeplinkActivity" ...>
            ...
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <!-- YOUR_SCHEME: Input your Android URI Scheme -->
                <data android:scheme="YOUR_SCHEME" />
            </intent-filter>
            <intent-filter android:autoVerify="true">
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <!-- YOUR_APP_NAME: Input your App Name -->
                <data android:scheme="http" android:host="YOUR_APP_NAME.abr.ge" />
                <data android:scheme="https" android:host="YOUR_APP_NAME.abr.ge" />
            </intent-filter>
            <intent-filter android:autoVerify="true">
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <!-- YOUR_APP_NAME: Input your App Name -->
                <data android:scheme="http" android:host="YOUR_APP_NAME.airbridge.io" />
                <data android:scheme="https" android:host="YOUR_APP_NAME.airbridge.io" />
            </intent-filter>
            ...
        </activity>
        ...
    </application>
    ```

    `YOUR_SCHEME` should be the URI scheme you submitted to the \[Tracking Links]>\[Deep Links] page in the Airbridge dashboard, without `://`.

    The `YOUR_APP_NAME` and `YOUR_APP_SDK_TOKEN` can be found on the \[Settings]>\[Tokens] page in the Airbridge dashboard.

    #### Redirect users with Airbridge Deep Links

    Call the `trackDeeplink` function when the app is opened through a deep link, so the SDK can collect the deep link event.

    **`ios/YOUR_PROJECT_NAME/AppDelegate.m`** **file**

    <CodeGroup>
      ```swift Swift lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      import airbridge_flutter_sdk
      ...
      // when app is opened with scheme deeplink
      override func application(
          _ app: UIApplication,
          open url: URL,
          options: [UIApplication.OpenURLOptionsKey : Any] = [:]
      ) -> Bool {
          // track deeplink
          AirbridgeFlutter.trackDeeplink(url: url)

          return true
      }
      ...
      // when app is opened with universal links
      override func application(
          _ application: UIApplication,
          continue userActivity: NSUserActivity,
          restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void
      ) -> Bool {
          // track deeplink
          AirbridgeFlutter.trackDeeplink(userActivity: userActivity)

          return true
      }
      ```

      ```objective-c Objective-C lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      #import <AirbridgeFlutter/AirbridgeFlutter.h>
      ...
      // when app is opened with scheme deeplink
      - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
          // track deeplink
          [AirbridgeFlutter trackDeeplinkWithUrl:url];
          return YES;
      }
      ...
      // when app is opened with universal links
      - (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler {
          // track deeplink
          [AirbridgeFlutter trackDeeplinkWithUserActivity:userActivity];
          return YES;
      }
      ```
    </CodeGroup>

    **`android/app/src/main/java/.../MainActivity.kt`** **file**

    <CodeGroup>
      ```kotlin Kotlin lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      import co.ab180.airbridge.flutter.AirbridgeFlutter
      ...
      override fun onResume() {
          super.onResume()
          AirbridgeFlutter.trackDeeplink(intent)
      }
      ...
      override fun onNewIntent(intent: Intent) {
          super.onNewIntent(intent)
          setIntent(intent)
      }
      ```

      ```java Java lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      import co.ab180.airbridge.flutter.AirbridgeFlutter;
      ...
      @Override
      protected void onResume() {
          super.onResume();
          AirbridgeFlutter.trackDeeplink(getIntent());
      }
      ...
      @Override
      public void onNewIntent(Intent intent) {
          super.onNewIntent(intent);
          setIntent(intent);
      }
      ```
    </CodeGroup>

    Call the `setOnDeeplinkReceived` function to retrieve the deep link set in the tracking link. Also, make sure the user is redirected to the intended in-app location using the converted scheme deep link.

    ```dart lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
    import 'package:airbridge_flutter_sdk/airbridge_flutter_sdk.dart';
    ...
    Airbridge.setOnDeeplinkReceived((url) {
        // show proper content using url
    });
    ```

    #### Redirect users through deferred deep linking

    No additional setup is required for deferred deep linking. When a user who hasn’t installed the app clicks a tracking link, they will be redirected to the app store, prompting them to install the app. After installation, when the user launches the app, the deep link set in the tracking link is automatically passed to the `OnDeeplinkReceived` function.
  </Accordion>

  <Accordion title="Expo SDK">
    ### SDK installation

    Install the Airbridge Expo SDK.

    <CodeGroup>
      ```bash npm lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
      npm install --save airbridge-expo-sdk
      npm install --save airbridge-react-native-sdk
      ```
    </CodeGroup>

    ### SDK initialization

    Initialize the SDK when the app is opened.

    The `YOUR_APP_NAME` and `YOUR_APP_SDK_TOKEN` can be found on the \[Settings]>\[Tokens] page in the Airbridge dashboard.

    ```json app.json lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
    {
      "expo": {
        ...
        "plugins": [
          ...
          [
            "airbridge-expo-sdk",
            {
              "appName": "APP_NAME",
              "appToken": "APP_TOKEN"
            }
          ]
        ]
      }
    }
    ```

    ### SDK setup

    Configure the SDK settings by following the steps below.

    ```json lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
    {
        "sdkEnabled": boolean,
        "logLevel": "debug" | "info" | "warning" | "error" | "fault",
        "autoStartTrackingEnabled": boolean,
        "autoDetermineTrackingAuthorizationTimeoutInSecond": number,
        "trackMetaDeferredAppLinkEnabled": boolean,
        "sessionTimeoutInSecond": number,
        "metaInstallReferrerAppID": string,
        "trackAirbridgeDeeplinkOnlyEnabled": boolean,
        "trackingLinkCustomDomains": [string],
        "hashUserInformationEnabled": boolean,
        "sdkSignatureID": string,
        "sdkSignatureSecret": string,
        "clearEventBufferOnInitializeEnabled": boolean,
        "eventBufferCountLimit": number,
        "eventBufferSizeLimitInGibibyte": number,
        "eventTransmitIntervalInSecond": number,
        "isHandleAirbridgeDeeplinkOnly": boolean,
        "collectTCFDataEnabled": boolean,
        "trackingBlocklist": [string],
        "calculateSKAdNetworkByServerEnabled": boolean
    }
    ```

    1. Create an airbridge.json file at the top level of the project folder, input the JSON as above, and configure the SDK settings.
    2. Don't input values for keys that are not necessary for your service.

    ### ATT prompt setup

    The SDK does not collect install events or trigger deferred deep linking until the user has responded to the ATT prompt.

    You can configure the timeout for the user's response to the ATT prompt using the `autoDetermineTrackingAuthorizationTimeoutInSecond` setting in `airbridge.json`.

    If the user does not respond within the specified timeout period, the install event will be collected, and deferred deep linking will be enabled regardless of the ATT prompt response. The default timeout value is 30 seconds.

    The Airbridge DeepLink Plan does not support attribution using identifiers. Therefore, to ensure that users who haven't installed the app are directed to the intended destination through deferred deep linking without delay, set the `autoDetermineTrackingAuthorizationTimeoutInSecond` value to 0 seconds.

    ```json lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
    {
        "autoDetermineTrackingAuthorizationTimeoutInSecond": 0
    }
    ```

    ### Deep linking setup

    Follow the instructions below and complete the setup for all the items below.

    #### Enable app launch with Airbridge Deep Links

    Complete the universal link app setup in the `associatedDomains` for iOS, and the app link setup in the `associatedDomains` for Android by referring to the code below.

    ```json app.json lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
    {
      "expo": {
        ...
        "scheme": "YOUR_SCHEME",
        "android": {
          ...
          "intentFilters": [{
            "autoVerify": true,
            "action": "VIEW",
            "data": { "scheme": "https", "host": "APP_NAME.airbridge.io" },
            "category": ["BROWSABLE", "DEFAULT"]
          }, {
            "autoVerify": true,
            "action": "VIEW",
            "data": { "scheme": "https", "host": "APP_NAME.abr.ge" },
            "category": ["BROWSABLE", "DEFAULT"]
          }, {
            "autoVerify": true,
            "action": "VIEW",
            "data": { "scheme": "http", "host": "APP_NAME.airbridge.io" },
            "category": ["BROWSABLE", "DEFAULT"]
          }, {
            "autoVerify": true,
            "action": "VIEW",
            "data": { "scheme": "http", "host": "APP_NAME.abr.ge" },
            "category": ["BROWSABLE", "DEFAULT"]
          }]
        },
        "ios": {
          ...
          "associatedDomains": [
            "applinks:APP_NAME.airbridge.io",
            "applinks:APP_NAME.abr.ge"
          ]
        }
      }
    }
    ```

    `YOUR_SCHEME` should be the URI scheme you submitted to the \[Tracking Links]>\[Deep Links] page in the Airbridge dashboard, without `://`.

    The `YOUR_APP_NAME` and `YOUR_APP_SDK_TOKEN` can be found on the \[Settings]>\[Tokens] page in the Airbridge dashboard.

    #### Redirect users with Airbridge Deep Links

    Call the `setOnDeeplinkReceived` function to retrieve the deep link set in the tracking link. Also, make sure the user is redirected to the intended in-app location using the converted scheme deep link.

    ```javascript lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
    import { Airbridge } from 'airbridge-react-native-sdk'
    ...
    Airbridge.setOnDeeplinkReceived((url) => {
        // show proper content using url
    })
    ```

    #### Redirect users through deferred deep linking

    No additional setup is required for deferred deep linking. When a user who hasn’t installed the app clicks a tracking link, they will be redirected to the app store, prompting them to install the app. After installation, when the user launches the app, the deep link set in the tracking link is automatically passed to the `OnDeeplinkReceived` function.
  </Accordion>
</AccordionGroup>

## Testing

Follow the steps below to verify that the SDK has been successfully installed.

### App install collection

1. Navigate to **\[Settings]>\[Testing Console]>\[Attributed  Installs]**.
2. Enter the ADID of the test device, which is GAID or IDFA.
3. Delete your app from the test device and scan the QR code.
4. Check the results.
5. If the test fails, revisit the SDK setup and SDK initialization steps and make sure the SDK is properly implemented.

### Deep linking

1. Navigate to **\[Settings]>\[Testing Console]>\[Deep Linking]**.
2. Input the deep link of the app you want to test.  It should be entered in the format of `scheme://product/12345`.
3. Complete the Essential Test 1, 2, and 3 by following the instructions on the dashboard.
4. Check the results.
5. If the test fails, revisit the dashboard setup, SDK setup, and deep link setup steps and make sure the SDK is properly implemented.

<link rel="alternate" hrefLang="en" href="https://help.airbridge.io/en/deeplink-developers/sdk-quickstart" />

<link rel="alternate" hrefLang="ko" href="https://help.airbridge.io/ko/deeplink-developers/sdk-quickstart" />
