v0.2.13 · MIT

LinkMe React Native SDK

Deep linking, deferred deep linking, and attribution for React Native and Expo apps. Expo config plugin for zero-config native setup.

1 Install

npm install @li-nk.me/react-native-sdk

2 Initialize

import {
    configure,
    getInitialLink,
    claimDeferredIfAvailable,
    onLink,
} from '@li-nk.me/react-native-sdk';

await configure({
    appId: 'your_app_id',
    appKey: 'your_app_key',
    debug: __DEV__,
});

3 Handle Links

// Live links while app is open
const sub = onLink((payload) => {
    if (payload?.path) router.replace(payload.path);
});

// Cold-start link
const initial = await getInitialLink();
if (initial?.path) {
    router.replace(initial.path);
} else {
    // Deferred deep link (first install)
    const deferred = await claimDeferredIfAvailable();
    if (deferred?.path) router.replace(deferred.path);
}

// Clean up
sub.remove();

Features

Expo Config Plugin

Automatic Associated Domains (iOS) and App Links (Android) setup. No manual native configuration needed.

Deferred Deep Linking

Pasteboard (iOS via expo-clipboard), Install Referrer (Android), and fingerprint fallback on first install.

Analytics

Track app events and attribute installs to campaigns with track() and UTM parameters.

TypeScript

Fully typed API with both functional and class-based interfaces. Works with Expo Router and React Navigation.