THIS IS OLD. DO NOT USE
https://docs.sentry.io/clients/react-native/
Show how Sentry works to surface errors in react-native applications (stacktraces will be symbolicated + unminified)
- Install dependencies listed under https://facebook.github.io/react-native/docs/getting-started.html#node-watchman-jdk (all except for node):
brew install watchman
brew tap AdoptOpenJDK/openjdk
brew cask install adoptopenjdk8
- Install cocoapods (
gem install cocoapods
) - Use nvm version specified in .nvmrc:
nvm use
- Install react-native-cli:
npm install -g react-native-cli@2.0.1
cd ReactNativeDemo
- Install packages:
npm install
- Make sure
SENTRY_AUTH_TOKEN
environment variable is set (https://docs.sentry.io/cli/configuration/#to-authenticate-manually)
$ react-native run-ios --configuration Release
$ react-native run-android --variant Release
-> Simulator/Emulator should have launched with sample app. Trigger errors and go to Sentry to see them!
- Replace DSN in App.js
- Replace org and project in ios/sentry.properties + android/sentry.properties.