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-nativeAdd the config plugin to handle native module linking, the URL scheme, and Associated Domains / App Links in the managed workflow:
{
"expo": {
"plugins": [
[
"@invitebase/react-native",
{
"linkDomain": "mycompany.refr.link"
}
]
]
}
}Then rebuild the dev client: npx expo prebuild && npx expo run:ios (or run:android).
npm install @invitebase/react-native
npx pod-installAutolinking handles both platforms. Complete the platform deep-link setup by hand: the Associated Domains entitlement on iOS and the verified intent filter on Android, both pointing at your {app}.refr.link subdomain.
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.
import { InvitebaseProvider } from '@invitebase/react-native';
export default function App() {
return (
<InvitebaseProvider publishableKey="pk_test_51Hq2jK">
<RootNavigator />
</InvitebaseProvider>
);
}| Prop | Type | Description |
|---|---|---|
publishableKey | string | Required. pk_test_… or pk_live_… — the prefix determines test vs live mode. |
autoResolve | boolean | Run deferred attribution automatically on first launch. Default true. |
debug | boolean | Log SDK activity. Default false. |
Deep-link handling
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.