SDK Guide

React Native Deep Linking SDK

Add deep linking to your React Native or Expo app with a single SDK. Works on iOS and Android with full support for deferred deep linking, install attribution, and custom domains.

Quick Start

1

Install the SDK

npx expo install @ulinkly/react-native

Bare React Native: npm install @ulinkly/react-native then npx install-expo-modules@latest. Not supported in Expo Go.

2

Add the config plugin (Expo)

// app.json
{
  "expo": {
    "plugins": [
      ["@ulinkly/react-native", {
        "scheme": "myapp",
        "domains": ["myapp.shared.ly"]
      }]
    ]
  }
}

Then run npx expo prebuild. The plugin configures iOS Associated Domains + URL scheme and Android intent filters automatically.

3

Initialize at startup

import ULink from '@ulinkly/react-native';

// Call once at app startup; always await initialize().
ULink.initialize({ apiKey: 'your-api-key', debug: __DEV__ })
  .catch(console.error);
4

Handle incoming links

import { useEffect } from 'react';
import ULink from '@ulinkly/react-native';

function App() {
  useEffect(() => {
    // Fires on cold-start, foreground, and deferred install.
    const sub = ULink.onDynamicLink((data) => {
      const screen = data.parameters?.screen;
      // Route the user to the right screen
    });
    return () => sub.remove(); // do NOT call ULink.dispose() here
  }, []);

  return <YourNavigator />;
}

Platform Configuration

Expo projects get all native configuration from the config plugin above. For bare React Native (no config plugin), configure the native files manually.

iOS
Universal Links

Add the Associated Domains entitlement and a URL scheme in Xcode:

  1. Open your iOS project in Xcode (ios/<App>.xcworkspace)
  2. Select your target → Signing & Capabilities
  3. Click "+ Capability" and add "Associated Domains"
  4. Add: applinks:yourapp.ulink.ly
  5. Add your URL scheme under Info → URL Types

After npx install-expo-modules, the SDK's AppDelegate subscriber intercepts links automatically — no manual AppDelegate edits. Ulinkly hosts your AASA file.

Android
App Links

Add intent-filters to AndroidManifest.xml:

<activity ...>
  <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" />
    <data
      android:scheme="https"
      android:host="yourapp.ulink.ly" />
  </intent-filter>
</activity>

Ulinkly automatically hosts your assetlinks.json file for App Links verification.

Deferred Deep Linking

Deferred deep linking preserves link context through the app install flow. When a user clicks a link, installs your app, and opens it—they land exactly where you intended.

How it works:

  1. 1
    User clicks your Ulinkly link on mobile web or social media
  2. 2
    Ulinkly detects the app isn't installed and redirects to App Store / Play Store
  3. 3
    Link context is stored with device fingerprint
  4. 4
    User installs and opens the app
  5. 5
    SDK delivers the original link via onDynamicLink with isDeferred: true
// Deferred links arrive through the same listener
ULink.onDynamicLink((data) => {
  if (data.isDeferred) {
    const referralCode = data.parameters?.ref;
    const productId = data.parameters?.product;
    // Credit referral, navigate to product, etc.
  }
});

Frequently Asked Questions

Ready to add deep linking to React Native?

Create a free account and get your API key. Most teams are live in under 30 minutes.