This documentation covers @apliko/react-native-deep-link 0.3.0.
Installation
Install the package using your preferred package manager.
npm install @apliko/react-native-deep-link@^0.3.0
# or
yarn add @apliko/react-native-deep-link@^0.3.0Deep links use React Native's built-in Linking API on mobile and the browser's location on web. Deferred deep linking uses a small native module included in the package. This native part (deferred linking, the iOS Paste button, and recognizing Android reopens from Recents) links automatically on React Native 0.60 and later; on older versions link it manually, or those features stay off. Rebuild your app after installing: run cd ios && pod install, or create a new Expo / EAS build. Until you do, or in Expo Go, deep links work and deferred linking is simply off.
Compatibility
| Environment | Supported | Entry point |
|---|---|---|
| React Native (bare) | 0.59 and later (native part autolinked on 0.60+) | @apliko/react-native-deep-link |
| Expo (dev build, prebuild, EAS) | Yes | @apliko/react-native-deep-link |
| Expo Go | Partly: only Expo Go's own exp:// dev links. Universal Links, App Links and deferred linking need a dev build. | @apliko/react-native-deep-link |
| React Native Web / Expo web | Yes | @apliko/react-native-deep-link |
| React web (Vite, webpack, Next.js, CRA) | Yes, React 16.8+ | @apliko/react-native-deep-link |
| Plain JavaScript (any bundler) | Yes, no React needed | @apliko/react-native-deep-link/core |
| Plain HTML, no build step | Yes | <script> from a CDN exposing window.AplikoLink |
react and react-native are optional peer dependencies: install whichever your app already uses. The /core entry never imports either. The SDK sets no minimum iOS or Android version of its own. Deferred linking needs iOS 16+ (the system Paste button) and, on Android, an install from Google Play; on older iOS versions deep links still work.
Upgrading from 0.2.x
0.3.0 adds a native module, so rebuild your app: run cd ios && pod install and make a new native build (or a new Expo / EAS build). If you built with a 0.3.0 pre-release, or autolinking looks stale, do a clean Android rebuild: delete android/build and android/app/build (or run ./gradlew clean). Behaviour changes: Android deferred linking is now on by default (turn it off with enableDeferred: false); your key is sent only to *.nvgt.link links, so data is {} for other links; server keys (sv_…) are refused; and all console output now needs debug: true. Existing two-argument listeners keep working; the new third meta argument is optional.
Plain JavaScript and plain HTML
import { AplikoLink } from '@apliko/react-native-deep-link/core';
AplikoLink.init({ apiKey: 'your-client-api-key' });
AplikoLink.addListener((url, data, meta) => {
// route to the page encoded in the link
});<script src="https://cdn.jsdelivr.net/npm/@apliko/react-native-deep-link@0.3.0/dist/apliko-link.min.js"></script>
<script>
AplikoLink.init({ apiKey: 'your-client-api-key' });
AplikoLink.addListener(function (url, data, meta) { /* ... */ });
</script>Pin an exact version in production. On Next.js or any server-rendered app, initialize on the client only (for example in a 'use client' component, or guarded by typeof window !== 'undefined').
Over-the-air updates
Everything except deferred linking is plain JavaScript, so an over-the-air update (EAS Update or similar) brings link delivery and fixes to builds already in your users' hands. Deferred linking needs the native part, so it stays off until the next store build; nothing crashes, and with debug: true the SDK says a rebuild is needed. With Expo's fingerprint runtime policy, adding this SDK changes the native fingerprint, so EAS Update holds the update back until a new build. To keep a build unchanged, exclude the native part from autolinking in react-native.config.js; deep links keep working and deferred linking is off.
// react-native.config.js
module.exports = {
dependencies: { '@apliko/react-native-deep-link': { platforms: { ios: null, android: null } } },
};Your iOS and Android projects still need to be configured to open your links. See Platform Setup.
Quick Start
Mandatory
You must initialize AplikoLink as early as possible (e.g., in your index.js or app entry file) with your Client API key. Until it is called, every other SDK method, the useAplikoLink hook and the AplikoLinkProvider throw [AplikoLinkManager] Please call init() first.
// index.js (or index.ts)
import { AplikoLink } from '@apliko/react-native-deep-link';
import App from './App';
// Initialize immediately with your Client API key
AplikoLink.init({ apiKey: "your-client-api-key" });Configuration Options
| Option | Type | Description |
|---|---|---|
apiKey* | string | Your Client API key. init throws if it is missing or empty. |
debug | boolean | Logs what the SDK is doing to the console. Defaults to false. See Debugging. |
enableDeferred | boolean | { ios?: boolean; android?: boolean } | Deferred deep linking. Defaults to Android on, iOS off. A boolean sets both platforms; an omitted key keeps that platform's default. Always off on web. See Deferred Deep Linking. |
webRuntimeLinks | boolean | Web only. Also reports browser back/forward and hash changes as 'runtime' links. Defaults to false. |
Call init once. Later calls are ignored, including any different options they pass.
Need a Client API Key?
Client API keys are generated for each project in the Hub. Use the Sandbox Hub while developing and the Production Hub for your released app. Client keys are cl_test_… (sandbox) or cl_live_… (production). Never use a Server API key (sv_…) in your app: the SDK refuses to send one, so links still arrive but without Apliko data, and with debug: true it tells you why. Spaces or line breaks around the key are ignored.