Docs
React Native SDK
Install, enable and configure the @nabrila/react-native package in your React Native app.
The SDK is the @nabrila/react-native package, MIT licensed. It needs React Native 0.82 or newer with the New Architecture (the module is a Turbo Module), React 19, Android 7.0 (API 24) or newer, and the iOS version your React Native release supports.
Install
Add the package to your project and install the iOS pods:
npm install @nabrila/react-native
cd ios && pod install
With Yarn:
yarn add @nabrila/react-native
cd ios && pod install
If your app uses Expo, you need a development build. The module is native, so it does not run in Expo Go.
Start Nabrila
Call Nabrila.start once, before the app renders, and wrap your app in NabrilaScope. The floating button only shows while NabrilaScope wraps your app.
import { Nabrila, NabrilaScope } from '@nabrila/react-native';
Nabrila.start({
appKey: 'nbr_...',
enabled: process.env.EXPO_PUBLIC_NABRILA_ENABLED === 'true', // or your own build flag
commit: process.env.EXPO_PUBLIC_GIT_COMMIT, // optional: the commit of this build
});
export default function App() {
return (
<NabrilaScope>
<Root />
</NabrilaScope>
);
}
| Parameter | What it does |
|---|---|
appKey |
Your app's key, which you copy from the dashboard. It starts with nbr_ and decides which workspace the reports go to. |
enabled |
If false, nothing is created: no button, no recording and no uploads. |
commit |
Optional. The git commit the build came from, 7 to 40 hex characters. Every report carries it, encrypted. |
shake |
Optional, true by default. Shaking the phone also opens the report. |
replay |
Optional. Options for the moments before the report, like enabled, maxFrames or maskAllText. |
network |
Optional. With false, network calls are not recorded. With { captureBodies: true } it also keeps redacted headers and a preview of text bodies. |
endpoint |
Optional. Changes the server. It must be https://; in development a local http:// server is accepted. |
context |
Optional. Pairs from your own app that every report carries; see Add your app's data. |
keepKeyOnDevice |
Optional. The report key never leaves the phone, even when your plan keeps keys on the server. |
Enable it only in test builds
Test builds are release builds too. That is why the SDK ships in all of them and enabled decides whether it does anything. Turn your flag on only when you build the test builds, and leave it off in the build you publish to the stores. With enabled: false, no button, no recording and no uploads are created.
Record route changes
You need no code. Inside NabrilaScope, the SDK finds React Navigation's NavigationContainer on its own, Expo Router's too, and records each screen by name, the first one included. If your app already has its own ref to the container, leave it as it is: the SDK does not touch it.
Only if your container sits outside NabrilaScope, pass it the ref you already have:
Nabrila.trackNavigation(navigationRef);
Nabrila.navigationRef, Nabrila.onNavigationChange and useNabrilaExpoRouter from version 0.1 still work, but they are no longer needed.
If your navigation is your own (no React Navigation, no Expo Router), name the screen yourself. null clears it, so a report from a screen outside any router carries no route instead of the last one:
Nabrila.setRoute('Checkout');
Nabrila.setRoute(null);
Add your app's data
Nabrila.setContext adds your own data to every report, like the environment or the test account. When the person using your app changes, call Nabrila.clearSession() so the next report carries nothing recorded from the previous person.
Nabrila.setContext('env', 'staging');
Nabrila.clearSession();
Hide private data
Wrap in NabrilaMask whatever must stay out of the screenshot and the replay:
<NabrilaMask>
<CardNumber />
</NabrilaMask>
Maps, web views and video players are native views the screenshot cannot copy faithfully. The screenshot and the replay mark them with a light veil, a dashed edge and the label "Native view", so whoever reads the report knows that part is not what the tester saw. To cover one entirely, wrap it in NabrilaMask. More on what gets covered in Hide private data.
Open a report from your code
const result = await Nabrila.open(); // shows the report flow
if (result.kind === 'sent') console.log(result.result.link);
Nabrila.open() never rejects. It resolves with sent, failed (with saved: true when the report waits on the phone), cancelled or unavailable. Nabrila.send({ note }) sends without showing the flow. If the connection drops, the report waits on the phone and goes out later, with no duplicates (Report delivery).
Known issues
- React Native 0.82 apps on iOS 27 must adopt UIScene (a
SceneDelegate, as the 0.88 template does) or they crash at launch. This is the app's, not the SDK's. - React Native 0.82.1 pods
fmt11.0.2, which does not compile with Xcode 27. Upgrade React Native or patchfmt. - With React Native 0.82 use
react-native-reanimated4.2.x.
Next steps
- Hide private data: what gets covered in the screenshot and the replay.
- Replay: the moments before the report.
- Report delivery: retries and how duplicates are avoided.
- Known limits: what the SDK does not capture yet.