Sections
Theme

React Native setup

Install @invitebase/react-native, set up the Expo config plugin, and wire the provider and deep links

@invitebase/react-native wraps the native iOS and Android SDKs behind a hooks-first TypeScript API. Attribution runs natively on each platform — clipboard handoff on iOS, Play Install Referrer on Android — so a React Native app gets exactly the same attribution quality as a fully native one. Expo is supported first-class via a config plugin, with no ejecting.

This page covers installation and wiring. The hooks API is documented in the React Native hooks reference; the shared method surface in the SDK reference. For a guided first integration, see the React Native quickstart.

All five SDKs ship as version 1.0 on November 15, 2026. Prebuilt UI components and push notifications are coming soon and are outside the November 15 release. Build custom UI with the SDK methods and reactive reads.

Install

npx expo install @invitebase/react-native

Add the config plugin to handle native module linking, the URL scheme, and Associated Domains / App Links in the managed workflow:

app.json
{
  "expo": {
    "plugins": [
      [
        "@invitebase/react-native",
        {
          "linkDomain": "mycompany.refr.link"
        }
      ]
    ]
  }
}

Then rebuild the dev client: npx expo prebuild && npx expo run:ios (or run:android).

In both cases, register your Apple Team ID + bundle ID and Android package name + signing fingerprints in the dashboard under Settings → Attribution — Invitebase serves the AASA and assetlinks.json files for your subdomain.

Provider setup

Wrap your app in InvitebaseProvider. It calls configure natively, starts deferred attribution, and makes the hooks work anywhere below it.

App.tsx
import { InvitebaseProvider } from '@invitebase/react-native';

export default function App() {
  return (
    <InvitebaseProvider publishableKey="pk_test_51Hq2jK">
      <RootNavigator />
    </InvitebaseProvider>
  );
}
PropTypeDescription
publishableKeystringRequired. pk_test_… or pk_live_… — the prefix determines test vs live mode.
autoResolvebooleanRun deferred attribution automatically on first launch. Default true.
debugbooleanLog SDK activity. Default false.

Deferred attribution (fresh installs) is fully automatic — the native layers run the clipboard handoff (iOS) and Install Referrer (Android) with no JavaScript involvement.

For the already-installed path (Universal Links / App Links), the provider listens for incoming URLs automatically on both Expo (expo-linking) and bare RN (Linking). If you manage URL subscriptions yourself — for example inside a navigation library's linking config — forward URLs explicitly:

import * as Linking from 'expo-linking';
import { useInvitebase } from '@invitebase/react-native';

function useInvitebaseLinks() {
  const invitebase = useInvitebase();

  React.useEffect(() => {
    const sub = Linking.addEventListener('url', ({ url }) => {
      invitebase.handleInbound(url);
    });
    Linking.getInitialURL().then((url) => url && invitebase.handleInbound(url));
    return () => sub.remove();
  }, [invitebase]);
}

handleInbound ignores URLs that are not referral links, so it is safe to forward everything.

Drop-in components

Coming soon. The prebuilt InviteScreen, ReferrerStatusView, and CodeEntrySheet family is outside the November 15 release. Build your own screens with the hooks and applyCode.

Push notifications

Coming soon. Push notifications and setPushToken are outside the November 15 release. Use email notifications for launch.

What's next

On this page