Installation & Setup

Install and configure the Smler React Native SDK for deferred deep linking on Android and iOS.


This guide walks you through installing the @smler/deferred-link React Native SDK and configuring it for both Android and iOS.

Requirements

  • React Native 0.60+ (auto-linking supported)

  • Android: minSdkVersion 21, compileSdkVersion 34

  • iOS: iOS 13.0+

  • TypeScript 5.0+ (recommended, but not required)

Install the Package

npm install @smler/deferred-link
# or
yarn add @smler/deferred-link

iOS Setup

After installing the npm package, install the native CocoaPods dependency:

cd ios && pod install

That's it for iOS. The native module is auto-linked. The iOS deep link detection logic runs entirely in JavaScript — it reads the clipboard and performs pattern matching without any additional native configuration.

Important: iOS Clipboard Access

React Native's built-in Clipboard module is used by default. If you are on a newer React Native version where Clipboard has been extracted from core, install the community module:

npm install @react-native-clipboard/clipboard

Android Setup

No additional configuration is required on Android. The SDK automatically bundles the Google Play Install Referrer library (com.android.installreferrer:installreferrer:2.2) as a dependency.

The native Android module is written in Kotlin and handles the full Install Referrer lifecycle internally — including connection management, result caching, retry on disconnect, and error handling. Your JavaScript code only needs to call a single async method.

Peer Dependencies (Optional)

Probabilistic Matching

For device-fingerprint-based probabilistic matching (fallback attribution when clipboard or referrer methods are not available), install react-native-device-info:

npm install react-native-device-info

If this package is not installed, probabilistic matching will still work but will send "Unknown" for the device and OS fields, which reduces match accuracy.

Verify Installation

Import the SDK in your app to verify it is linked correctly:

import { SmlerDeferredLink, HelperReferrer } from '@smler/deferred-link';

// If this doesn't throw, the native module is linked correctly
console.log('Smler SDK loaded');

If you see an error like "The package 'react-native-smler-deferred-link' doesn't seem to be linked", check the following:

  1. You have run pod install in the ios/ directory

  2. You rebuilt the app after installing the package (a hot reload is not sufficient)

  3. You are not using Expo Go — use a development client or bare React Native workflow

What's Next

Published with LeafPad