Setup With CocoaPods

In order to use Sentry with CocoaPods you have to install the packages with npm or yarn and link them locally in your Podfile.

npm install --save react react-native react-native-sentry
yarn add react react-native react-native-sentry

After that change your Podfile to reference to the packages in your node_modules folder. For the latest reference on how to use React Native with CocoaPods see: Integration with existing apps

target 'YOUR-TARGET' do
  # Your react-native and other pods

  pod 'SentryReactNative', :path => '../node_modules/react-native-sentry/SentryReactNative.podspec' # or your path to node_modules

After that run pod install which then should link everything correctly. Please keep in mind that you need the build steps that upload your source maps and debug symbols.

Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) to suggesting an update ("yeah, this would be better").