Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(react-native): Add @sentry/wizard to Expo guide #10614

Merged
merged 5 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
```

krystofwoldrich marked this conversation as resolved.
Show resolved Hide resolved
<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
Loading