Current SDK release: 0.2.15 (September 2026).
React Native setup tutorial
This walkthrough reproduces the Expo example located at sdks/react-native/example-expo so you can adapt it to your own navigation stack.
Before you start
- LinkMe app with iOS + Android identifiers filled in
- Expo Router or React Navigation project running React Native 0.72+ for bare integration; the tested example uses Expo SDK 57 / React Native 0.86.3
- Node.js 22+ for development tooling
1. Configure your LinkMe app
- In the portal, open Apps → Your app.
- Confirm the iOS bundle ID and Android package match what Expo/React Native will build.
- Generate an API key and copy the
appIdandappKey. - Toggle Pasteboard for Deferred Links (iOS) if you install
expo-clipboard.
2. Install packages
npm install @li-nk.me/react-native-sdk
npx expo install expo-clipboard # optional but recommended on iOS
Package: @li-nk.me/react-native-sdk
3. Configure Expo / linking
app.json
{
"expo": {
"scheme": "yourapp",
"plugins": [
[
"@li-nk.me/react-native-sdk/plugin/app.plugin.js",
{
"hosts": ["links.yourco.com"],
"associatedDomains": ["links.yourco.com"],
"schemes": ["yourapp"]
}
]
],
"ios": { "bundleIdentifier": "com.yourco.app" },
"android": { "package": "com.yourco.app" }
}
}
Bare React Native projects should follow the native setup guides for Associated Domains (iOS) and App Links (Android) before continuing.
4. Initialize LinkMe in your root layout
import { useEffect } from 'react';
import { useRouter } from 'expo-router';
import {
configure,
getInitialLink,
claimDeferredIfAvailable,
onLink,
track,
} from '@li-nk.me/react-native-sdk';
export function useLinkMe() {
const router = useRouter();
useEffect(() => {
let active = true;
let unsubscribe: { remove: () => void } | null = null;
(async () => {
await configure({
baseUrl: 'https://links.yourco.com',
appId: process.env.EXPO_PUBLIC_LINKME_APP_ID!,
appKey: process.env.EXPO_PUBLIC_LINKME_APP_KEY,
debug: __DEV__,
});
if (!active) return;
unsubscribe = onLink((payload) => {
if (active && payload?.path) router.replace(payload.path as never);
});
const initial = await getInitialLink();
if (!active) return;
if (initial?.path) {
router.replace(initial.path as never);
} else {
const deferred = await claimDeferredIfAvailable();
if (active && deferred?.path) router.replace(deferred.path as never);
}
await track('open');
})();
return () => { active = false; unsubscribe?.remove(); };
}, [router]);
}
Call useLinkMe() from app/_layout.tsx (Expo Router) or inside your root navigator. If you prefer React Navigation, wire the same hook inside your navigation container and use navigation.navigate(payload.path).
5. Wire platform-specific extras
- iOS: Install
expo-clipboardand enable the pasteboard toggle in the portal for deterministic first-install claims. Pasteboard prompts depend on the OS version and app permissions; test on physical devices. - Android: The SDK reads Play Install Referrer when a native
LinkMeInstallReferrer.getInstallReferrermodule is available; otherwise it falls back to fingerprint matching. Ensure your release keystore fingerprint is saved in LinkMe so App Links verify.
6. Run the sample app
Clone or open sdks/react-native/example-expo, copy .env.example to .env, set your keys, and build a development client with npx expo run:ios or npx expo run:android, then run npx expo start --dev-client. The example demonstrates onboarding flows, analytics tracking, and both direct/deferred routing.
Next steps
- Consult the Android and iOS SDK references for every method signature.
- Read the Deferred Deep Linking Guide to understand how the JS SDK mirrors the native behavior.