Skip to content

Commit

Permalink
feat(react-native): Add @sentry/wizard to Expo guide (#10614)
Browse files Browse the repository at this point in the history
Co-authored-by: vivianyentran <20403606+vivianyentran@users.noreply.github.com>
  • Loading branch information
krystofwoldrich and vivianyentran authored Jul 16, 2024
1 parent 1ade939 commit a3b0e4e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
6 changes: 4 additions & 2 deletions docs/platforms/react-native/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,14 @@ npx @sentry/wizard@latest -s -i reactNative
<Expandable title="The following tasks will be performed by the Sentry Wizard">

- Install the `@sentry/react-native` package.
- Add the `@sentry/react-native/metro` to the _*metro.config.js*_ Metro configuration.
- Add the `@sentry/react-native/expo` to the _*app.json*_ Expo configuration.
- Enable the Sentry React Native Gradle build step for Android to auto-upload generated source maps and debug symbols.
- Wrap the _Bundle React Native code and images_ Xcode project build phase script to upload generated source maps and collect bundled node modules.
- Add _Upload Debug Symbols to Sentry_ Xcode project build phase.
- Run `pod install`.
- Store build credentials in _*ios/sentry.properties*_ and _*android/sentry.properties*_.
- Configure Sentry for the supplied DSN in your _*App.tsx*_ file.
- Store build credentials in _*ios/sentry.properties*_, _*android/sentry.properties*_ and _*env.local*_.
- Configure Sentry for the supplied DSN in your _*layout.tsx*_/_*App.tsx*_file.

</Expandable>

Expand Down
26 changes: 24 additions & 2 deletions docs/platforms/react-native/manual-setup/expo.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,31 @@ To set up the Sentry React Native SDK in your Expo project, follow the steps on
- [Migrate from `sentry-expo` to `@sentry/react-native`](/platforms/react-native/migration/sentry-expo/).
- [Sign up for an account](https://sentry.io/signup/).

## Install the Sentry SDK
## Automatic Install

Install the `@sentry/react-native` package:
Use the [Sentry Wizard](https://github.com/getsentry/sentry-wizard) to patch your project automatically, as shown below. Alternatively, you can follow the [Manual Install](./#manual-install) if you prefer. You only need to patch the project once. Then, you can add the patched files to your version control system.

```bash {tabTitle:npm}
npx @sentry/wizard@latest -i reactNative
```

<Expandable title="The following tasks will be performed by the Sentry Wizard">

- Install the `@sentry/react-native` package.
- Add the `@sentry/react-native/metro` to the _*metro.config.js*_ Metro configuration.
- Add the `@sentry/react-native/expo` to the _*app.json*_ Expo configuration.
- Enable the Sentry React Native Gradle build step for Android to auto-upload generated source maps and debug symbols.
- Wrap the _Bundle React Native code and images_ Xcode project build phase script to upload generated source maps and collect bundled node modules.
- Add _Upload Debug Symbols to Sentry_ Xcode project build phase.
- Run `pod install`.
- Store build credentials in _*ios/sentry.properties*_, _*android/sentry.properties*_ and _*env.local*_.
- Configure Sentry for the supplied DSN in your _*layout.tsx*_ file.

</Expandable>

## Manual Install

If you don't use the Wizard, install the `@sentry/react-native` package:

```bash {tabTitle:Expo}
npx expo install @sentry/react-native
Expand Down

0 comments on commit a3b0e4e

Please sign in to comment.