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 support for Expo managed projects #505

Merged
merged 35 commits into from
Jul 8, 2024

Conversation

krystofwoldrich
Copy link
Member

@krystofwoldrich krystofwoldrich commented Nov 29, 2023

This PR adds support for Expo project (with and without native dirs).
The support includes:

  • patch app.json configuration file with @sentry/react-native/expo
  • create or patch metro.config.json with @sentry/react-native/metro getSentryExpoConfig
  • patch Expo Xcode Build Phase with sentry-xcode.sh
  • add .env.local with Sentry Auth Token
  • gitignore .env.local

Copy link

github-actions bot commented Nov 29, 2023

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against d4513bf

@krystofwoldrich krystofwoldrich marked this pull request as ready for review December 4, 2023 12:22
@krystofwoldrich krystofwoldrich requested review from lforst and Lms24 and removed request for lforst December 4, 2023 15:49
@krystofwoldrich
Copy link
Member Author

@lucas-zimerman you can also take a look. 🙏

Copy link
Contributor

@lucas-zimerman lucas-zimerman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!
After the release of the new wizard, we should update the docs here https://docs.sentry.io/platforms/react-native/ on how to setup an expo project.

@krystofwoldrich
Copy link
Member Author

krystofwoldrich commented Dec 5, 2023

Yes, related docs PR here.

@krystofwoldrich
Copy link
Member Author

krystofwoldrich commented Dec 6, 2023

DO NOT MERGE!

The current implementation overwrites Expo default customSerializer. The build of an app still works, but the wizard unexpectedly removes some processing of the bundle.

Add check for app.json before app.config.json.

@Lms24
Copy link
Member

Lms24 commented Jul 8, 2024

@krystofwoldrich is this ready for a review? (no rush, just trying to catch up with wizard stuff after PTO 😅)

@krystofwoldrich krystofwoldrich marked this pull request as ready for review July 8, 2024 09:10
@krystofwoldrich
Copy link
Member Author

@Lms24 Thank you for the message, yes, since the morning it's ready for review.

Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM from general wizard perspective! I couldn't test it though as I don't have an RN test environment, so deferring this to other reviewers/you :)

All good to merge from my end!

src/react-native/expo-env-file.ts Outdated Show resolved Hide resolved
@krystofwoldrich krystofwoldrich merged commit fe849fe into master Jul 8, 2024
11 checks passed
@krystofwoldrich krystofwoldrich deleted the kw-add-rn-expo branch July 8, 2024 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Sentry Metro Plugin for Expo
3 participants