# Watch a React Native or Expo app

> Add Relia to a React Native or Expo app, so sessions, screens, taps, API calls and crashes show up in Relia, joined to your backend, with readable crash stacks from release builds.

Section: Set up your stack · Page: https://tryrelia.com/docs/react-native-setup · Last checked against the product: 2026-11-19

> **Available from Monday 23 November.** The `relia-react-native` package goes live then. Flutter apps can be set up today: [Watch a Flutter app](https://tryrelia.com/docs/flutter-setup.md).

Relia watches your mobile app the way it watches your website: what people did, what crashed, and which API call came just before it. When a backend change breaks one version of your app, the incident shows both sides. To have your AI assistant do the setup instead, see [Set up Relia with your AI assistant](https://tryrelia.com/docs/setup-with-ai-assistant.md).

## Before you start

- A Relia account ([Create your account](https://tryrelia.com/docs/create-account.md)).
- A React Native app (0.72 or newer) or an Expo app.
- Node.js, to run the setup command.

## Steps

1. **Run the setup** in your app's folder:

   ```bash
   npx relia-sdk@latest init
   ```

   It finds Expo or bare React Native, installs `relia-react-native`, writes `relia.ts`, wraps your root component and sets up your release builds to upload their symbols.

2. **Or by hand**, the two lines that matter:

   ```ts
   import { Relia } from "relia-react-native"

   Relia.init({ projectId: "your-project-id", key: "relia_live_…" })

   export default Relia.wrap(App)
   ```

   - **Expo Router:** wrap your root layout (`app/_layout.tsx`); screens are named by their route.
   - **React Navigation:** also call `Relia.watchNavigation(navigationRef)` once, next to where the ref is created.

3. **See a crash arrive.** In a development build (`npx expo run:android` or an EAS development build; Expo Go has no crash files), add a button that calls `Relia.testCrash()`, press it, and open the app again. The crash shows on **Mobile app** in Relia within a minute. Remove the button afterwards.

## Readable crashes

A release build's crash stack is a list of offsets in a bundle until Relia has the build's symbols. Each release build uploads them by itself (the JavaScript source map, and Android's R8 mapping when your build shrinks its code):

1. Expo: add `"relia-react-native"` to `"plugins"` in `app.json`. Bare React Native: `relia init` adds one line to `android/app/build.gradle`.
2. Run `npx relia-sdk@latest token` once in the app's folder. It writes an **upload-only** token to `.env.local`.
3. Add `RELIA_PROJECT_ID` and that `RELIA_TOKEN` to your EAS secrets or CI variables.

A failed upload never fails your build. On the project's **Setup** tab, "Symbols" turns green once your newest release has them.

## Join the app to your backend

```ts
Relia.init({ projectId: "your-project-id", key: "relia_live_…", propagateTo: ["api.yourdomain.com"] })
```

Calls to the hosts you list carry a `traceparent` header, so one incident shows the phone and the server. Third-party APIs never get it.

## Who your users are

After sign-in (or when a saved sign-in is restored): `Relia.identify(user.id, { email, name, plan })`. On sign-out: `Relia.reset()`. Nothing about the person is sent without it.

## What it records

- **Screens:** the route's name or template, never its parameters.
- **Taps:** the accessibility label, test id or component name. Text only with `captureText: true`, and never from an input.
- **API calls:** method, address without its query, status and duration. Calls that fail because the phone was offline, or that the app cancelled, are never counted as failures.
- **Crashes and freezes:** JavaScript crashes, Android crashes, "app not responding" and memory kills, kept on the phone until Relia has them.
- **Your app's version and build**, the phone model, system version and network type.

It never records typed text, screen pixels, a URL's query or an advertising id. React Native's own error handling, Crashlytics and Sentry keep working.

## App store privacy forms

What to declare when your app includes Relia (check it against everything else your app collects):

- **Apple (App Privacy):** Crash Data, Performance Data, Other Diagnostic Data and Product Interaction, used for App Functionality and Analytics, not used for tracking. Not linked to identity, unless you call `Relia.identify`: then also User ID (and Email Address or Name if you pass them), linked to the user.
- **Google Play (Data safety):** App info and performance (crash logs, diagnostics) and App activity (app interactions), collected, not shared, encrypted in transit. With `Relia.identify`, also Personal info (user IDs, and email address or name if you pass them).

## What it costs

**300 units per device per month.** Each phone or tablet that opens your app counts once in a calendar month, however many times it is used that month. Crashes are free. See [Plans and billing](https://tryrelia.com/docs/plans-and-billing.md).

## Not yet

Native iOS crashes (outside JavaScript). Sessions, screens, taps, API calls and JavaScript crashes already work on iOS.

---
All Relia docs for AI assistants: https://tryrelia.com/llms.txt (index) · https://tryrelia.com/llms-full.txt (everything in one file)
