Skip to content
Draft
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
2 changes: 1 addition & 1 deletion docs/platforms/react-native/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ npx @sentry/wizard@latest -i reactNative
- 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*_.
- 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
4 changes: 2 additions & 2 deletions docs/platforms/react-native/manual-setup/expo.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ npx @sentry/wizard@latest -i reactNative
- 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*_.
- 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>
Expand Down Expand Up @@ -165,6 +165,6 @@ To verify that everything is working as expected, build the `Release` version of

## Notes

- Don't commit your auth token. Instead, use an environment variable like `SENTRY_AUTH_TOKEN`.
- Don't commit your auth token. Store it in `.env.local` as `SENTRY_AUTH_TOKEN` for local builds, and as an [EAS secret](https://docs.expo.dev/build-reference/variables/#using-secrets-in-environment-variables) for EAS builds.
- Source maps for the `Release` version of your application are uploaded automatically during the native application build.
- During development, the source code is resolved using the Metro Server and source maps aren't used. This currently doesn't work on web.
13 changes: 9 additions & 4 deletions includes/react-native-expo-plugin-code-snippet.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,14 @@ export default withSentry(config, {

</Alert>

Add auth token to your environment:
Add your auth token to a `.env.local` file in the root of your project:

```bash
# DO NOT COMMIT YOUR AUTH TOKEN
export SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___
```properties {filename:.env.local}
SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___
```

<Alert>

Do not commit your auth token. Add `.env.local` to your `.gitignore`. For EAS builds, add `SENTRY_AUTH_TOKEN` as an [EAS secret](https://docs.expo.dev/build-reference/variables/#using-secrets-in-environment-variables) instead of using a `.env.local` file.

</Alert>
Loading