BlogReact Native

React Native deep linking without Firebase: App Links, React Navigation and deferred links

· 8 min read · By the Strait team

How to replace @react-native-firebase/dynamic-links in a bare React Native app. What you can build with Linking and React Navigation alone, where deferred links need a server, and a step-by-step move to a hosted link service.

For years the default answer to "deep links in React Native" was @react-native-firebase/dynamic-links: getInitialLink() for the launch link, onLink() for links while the app runs, and Firebase's servers doing the rest. Firebase Dynamic Links shut down on 25 August 2025. Google no longer opens your app from old page.link URLs: some now return 404, and the ones that still redirect go only to their web or store fallback. If your app still has that package, getInitialLink() and onLink() have nothing left to give it.

This post is the React Native version of the migration. First, what you can do with nothing but React Native and React Navigation. Then the two things that need a server, and how to wire a hosted link service into the same app. Using Expo instead? See Expo Router deep links. Flutter? See Flutter deep linking without Firebase.

What Firebase was doing for you

It helps to split the old package into the jobs it did:

  1. Hosting the link and deciding what to do with a tap. A page.link URL went to Firebase, which sent Android users to the app or Google Play and iPhone users to the app or the App Store.
  2. Verification files. Firebase served assetlinks.json and apple-app-site-association on page.link, so App Links and Universal Links worked for its domain.
  3. Deferred links. After an install, getInitialLink() could still return the link the person tapped before installing.
  4. Link stats in the Firebase console.

The first two you can do yourself on your own domain. The third and fourth need a server that sees the tap.

Option 1: React Native and React Navigation only

If your links only need to open an installed app, you can do it without any link service.

Verify a domain you own. Put assetlinks.json at https://yourdomain.com/.well-known/assetlinks.json with your package name and your signing keys' SHA-256 fingerprints, and apple-app-site-association at the same path for iPhone. The assetlinks.json generator and the AASA generator build both files. Then add an autoVerify intent filter for the domain in AndroidManifest.xml, and the applinks: entry under Associated Domains in Xcode.

Pass links to JavaScript on iPhone. React Native's Linking docs show the lines your AppDelegate needs (through RCTLinkingManager) so that custom-scheme URLs and Universal Links reach JavaScript. Without them, iOS opens the app and the link is lost.

Let React Navigation route. React Navigation's linking option maps URLs to screens and handles both the launch URL and URLs that arrive while the app runs:

App.tsx
import { NavigationContainer } from '@react-navigation/native';

const linking = {
  prefixes: ['yourapp://', 'https://yourdomain.com'],
  config: {
    screens: {
      Home: '',
      Product: 'product/:id',
    },
  },
};

export default function App() {
  return (
    <NavigationContainer linking={linking}>
      {/* your navigator */}
    </NavigationContainer>
  );
}

Under the hood it uses React Native's Linking.getInitialURL() for the link that launched the app and a url event listener for later ones, the same two cases getInitialLink() and onLink() covered.

That's a complete setup for installed apps, and it costs nothing. What it can't do:

  • Nothing for people without the app. A tap on https://yourdomain.com/product/42 from someone who hasn't installed it loads your website. Sending them to the store is up to that page, and the link is gone after the install.
  • In-app browsers. Instagram, Facebook and some WhatsApp versions open links in their own browser, where App Links don't fire. Your website loads inside Instagram even with the app installed. Why Instagram and WhatsApp links open the browser explains why.
  • No counts. You'll know about app opens only if you log them yourself.

The missing pieces all happen before your app runs, so they need a server that sees the tap: it detects the device and the in-app browser, sends the right redirect or page, carries the link through Google Play, and records each tap. That's what a hosted service like Strait replaces Firebase with. The setup takes four steps.

Step 1: install the SDK

Install the SDK from npm, pinned to a version, with two packages it needs:

Terminal
npm install @straitlink/react-native@0.11.6 @react-native-async-storage/async-storage react-native-play-install-referrer

Then create the client once and import it from index.js:

links.ts
import AsyncStorage from '@react-native-async-storage/async-storage';
import { PlayInstallReferrer } from 'react-native-play-install-referrer';
import { createStrait, fromPlayInstallReferrer } from '@straitlink/react-native';

export const links = createStrait({
  publishableKey: 'st_pub_live_…',
  endpoint: 'https://hilltop.strait.link',
  storage: AsyncStorage,
  installReferrer: fromPlayInstallReferrer(PlayInstallReferrer),
});

links.start();

The SDK adds a native module, so rebuild with npx react-native run-android; a Metro reload isn't enough.

Step 2: map the old calls

Firebase (@react-native-firebase/dynamic-links) Strait
dynamicLinks().getInitialLink() links.onLink(cb): the launch link arrives as an event, and late subscribers get it replayed
dynamicLinks().onLink(cb) the same links.onLink(cb)
Deferred link through getInitialLink() onLink with kind: 'deferred', once, on the first open after install
link.url e.path and e.params (the destination's path and query)

One callback covers a cold start, a link while the app runs and the first open after an install.

Step 3: route without double handling

Keep React Navigation for screens, but don't list your link domain in linking.prefixes. A short link like https://hilltop.strait.link/summer isn't a screen path: the SDK resolves it to its destination (/product/42) and gives you that. If React Navigation also sees the short link, each tap is handled twice. Route from onLink instead:

App.tsx
<NavigationContainer
  ref={navigationRef}
  onReady={() => links.onLink((e) => {
    if (e.matched && e.path) openPath(e.path, e.params);
  })}
>

openPath is your own small function that maps a path to a screen; Receive links has one. You can keep yourapp:// in React Navigation for other uses as long as your link domain isn't there.

Step 4: native settings

Add the verified-link intent filter for your link host and the custom-scheme filter in AndroidManifest.xml, and applinks: for the link host in Xcode. The exact snippets are in React Native: install and set up. Then add your SHA-256 fingerprints and Team ID in Dashboard → Apps & stores, and the link server serves both verification files for your link domain. Check them with the App Links checker.

The Firebase console showed a count per link, and for some teams that was their whole link report. A hosted service records more than a count: each tap is stored with where the link server sent it (the app, Google Play, the App Store, an in-app browser page or your website), and the SDK reports each app open, joined back to its tap. Installs that came through a link are counted once, on the first open.

Two habits make those numbers useful from day one:

  • Tag links by channel. Put utm_source and utm_campaign in each link's destination, or use the UTM builder. Taps from WhatsApp, Instagram and Gmail are named without tags in many cases, but a tag you set always wins.
  • Record the event that matters. links.trackEvent('purchase', { value: 499, currency: 'INR' }) attaches a purchase to the tap that brought the person, so a campaign shows revenue, not just opens (Events & revenue).

Deep link analytics: taps, opens and installs explains how each number is defined.

Links you shared before the shutdown still exist in old emails, QR codes and chats. You can't redirect them yourself, because page.link belongs to Google. Some may still do a plain redirect to their old fallback, but Google no longer opens the app from them and could stop them at any time. People who already have your app can still open it from them if your next build keeps the page.link domain (how). What you can do is recreate the important ones on your own link domain and update every place you control. The page.link checker shows what each old link pointed to and produces a CSV you can import. The Firebase migration guide walks through the cut-over.

Testing on a real phone

  • Installed app: adb shell am start -W -a android.intent.action.VIEW -d "https://hilltop.strait.link/summer" should open the right screen. Our adb commands post has more.
  • Deferred link on Android: this needs a build installed from Google Play, such as internal testing. A build from Android Studio has no install referrer. The React Native deferred recipe goes through it step by step.
  • iPhone: Universal Links need a real device and a build signed with your team. Strait's Universal Links were tested on a real iPhone in October 2026; install matching for deferred links is opt-in.

Common problems

  • PlayInstallReferrer is undefined. The app wasn't rebuilt after installing the native module.
  • The screen opens twice. Your link domain is still in linking.prefixes.
  • Universal Links open the app but nothing happens. The AppDelegate lines from React Native's Linking docs are missing, so the link never reaches JavaScript.
  • The first open lands on the home screen on Android. The build didn't come from Google Play, so there was no install referrer to read.
  • Links open from Chrome but not from Instagram. That's Instagram's in-app browser, not your setup. The link server answers it with its own page; run the Will it open my app? simulator to see which one.
  • The https adb command opens the browser. Your App Links aren't verified for the link host on that phone: on Android 12 and later an unverified https link goes to the default browser. Check with adb shell pm get-app-links.
  • A custom-scheme link opens a chooser. Another installed app claims the same custom scheme. Pick a more specific one, such as hilltopshoes.

Sources and how we checked

  • Firebase, Dynamic Links deprecation FAQ: the shutdown on 25 August 2025.
  • React Native, Linking: getInitialURL, the url event and the iOS AppDelegate setup. React Navigation, Configuring links: the linking option.
  • Android Developers, Verify App Links.
  • The Strait SDK calls are from its React Native docs and code (@straitlink/react-native 0.11.6). The Android deferred result is from our real-phone test with a Google Play internal testing build (October 2026).