Skip to content

Commit 82e4c3e

Browse files
feat(rn): Update to new one-line command to install RN SDK (#6632)
Co-authored-by: Shana Matthews <shana.l.matthews@gmail.com>
1 parent 41a721a commit 82e4c3e

File tree

2 files changed

+8
-28
lines changed

2 files changed

+8
-28
lines changed

src/platform-includes/getting-started-install/react-native.mdx

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,30 @@ If you wish to install Sentry's React Native SDK v4, follow the steps [here](/pl
44

55
</Note>
66

7-
Add the `@sentry/react-native` dependency:
7+
Run `@sentry/wizard`:
88

99
```npm
10-
npm install --save @sentry/react-native
10+
npx @sentry/wizard -s -i reactNative
1111
```
1212

1313
```yarn
14-
yarn add @sentry/react-native
15-
```
16-
17-
Run `@sentry/wizard`:
18-
19-
```bash
20-
npx @sentry/wizard -i reactNative -p ios android
21-
22-
cd ios
23-
pod install
14+
yarn sentry-wizard -s -i reactNative
2415
```
2516

2617
<Note>
2718

28-
For React Native 0.68 and older, you'll have to manually patch the Xcode project. Read more on the [Manual Configuration](/platforms/react-native/manual-setup/manual-setup/) page.
19+
The wizard doesn't support React Native versions `0.68` and older. To use the wizard with older versions of React Native, you'll have to `confirm` in the wizard dialogue and manually patch the Xcode project later. Read more on the [Manual Configuration](/platforms/react-native/manual-setup/manual-setup/) page.
2920

3021
</Note>
3122

3223
[Sentry Wizard](https://github.com/getsentry/sentry-wizard) will patch your project accordingly, though you can [set up manually](/platforms/react-native/manual-setup/manual-setup/) if you prefer. You only need to patch the project once. Then you can add the patched files to your version control system.
3324
The following tasks will be performed by the Sentry Wizard:
3425

26+
- Install the `@sentry/react-native` package.
3527
- Enable the Sentry React Native Gradle build step for Android to auto-upload generated source maps and debug symbols.
3628
- Wrap the _Bundle React Native code and images_ Xcode project build phase script to upload generated source maps and collect bundled node modules.
3729
- Add _Upload Debug Symbols to Sentry_ Xcode project build phase.
30+
- Run `pod install`.
3831
- Store build credentials in _*ios/sentry.properties*_ and _*android/sentry.properties*_.
3932
- Configure Sentry for the supplied DSN in your _*App.tsx*_ file.
4033

src/wizard/react-native/index.md

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,10 @@ Sentry captures data by using an SDK within your application’s runtime.
1010
> If you are using Expo, see [How to Add Sentry to Your Expo Project](https://docs.expo.io/guides/using-sentry/). This SDK works for both managed and bare projects.
1111
1212

13-
Install our React Native SDK using either `yarn` or `npm`:
13+
Run `@sentry/wizard`:
1414

1515
```bash
16-
npm install --save @sentry/react-native
17-
# or
18-
yarn add @sentry/react-native
19-
```
20-
21-
Run `@sentry/wizard` to setup automatic source maps upload:
22-
23-
```bash
24-
npx @sentry/wizard -i reactNative -p ios android
25-
# or
26-
yarn sentry-wizard -i reactNative -p ios android
27-
28-
cd ios
29-
pod install
16+
yarn sentry-wizard -s -i reactNative
3017
```
3118

3219
[Sentry Wizard](https://github.com/getsentry/sentry-wizard) will patch your project accordingly, though you can [setup manually](/platforms/react-native/manual-setup/manual-setup/) if you prefer.

0 commit comments

Comments
 (0)