Connect your React-Native project to GlitchTip


Start by adding the SDK and then linking it:

$ npm install react-native-sentry --save
# or
# yarn add react-native-sentry
# if you are using yarn
# this is for linking
$ react-native link react-native-sentry

The link step will pull in the native dependency and patch your project accordingly.

Upon linking the following changes will be performed:

  • add the sentry-java package for native crash reporting on Android
  • add the sentry-cocoa package for native crash reporting on iOS
  • enable the sentry gradle build step for android
  • patch AppDelegate.m for iOS
  • patch for Android
  • configure the SDK for the supplied DSN in your index.js/App.js files
  • store build credentials in ios/ and android/

Client Configuration

When you run react-native link we will automatically update your index.ios.js / with the following changes:

import { Sentry } from "react-native-sentry";
Sentry.config("your DSN here").install();

You can pass additional configuration options to the config() method if you want to do so.