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(android): 🌟 add support for React Native 0.73 #3133

Merged
merged 8 commits into from
Jun 26, 2023

Conversation

peterlazar1993
Copy link
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

💡 Motivation and Context

Starting from React Native v0.73 , all libraries will need to be updated with namespace due to the upgrade to AGP 8
react-native-community/discussions-and-proposals#671

OS Implemented
iOS
Android

💚 How did you test it?

I tested the changes on RN 0.71.11 and everything works!

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • All tests passing
  • No breaking changes

🔮 Next steps

@krystofwoldrich
Copy link
Member

@peterlazar1993 Thank you for the PR. Before we merge, we need to make sure this is compatible with our min-supported RN version 0.65.3.

@fabiendem
Copy link

@krystofwoldrich

[...] Thank you for the PR. Before we merge, we need to make sure this is compatible with our min-supported RN version 0.65.3.

Do you folks really need to support RN down to 0.65.3?
RN is no longer maintained below 0.69.x:
https://github.com/reactwg/react-native-releases#releases-support-policy

@krystofwoldrich
Copy link
Member

@fabiendem For the v5 we have to and also want to respect semver. In case it's not possible to keep the SDK compatible we might think about bumping the version to v6.

@marandaneto
Copy link
Contributor

You can make that compatible by doing this https://github.com/getsentry/sentry-dart/blob/ddc97adb5918b9f9eda573656e6edd9401b17801/flutter/android/build.gradle#L27-L30

@krystofwoldrich
Copy link
Member

@marandaneto Awesome, thank you for sharing that.

@krystofwoldrich
Copy link
Member

RN 0.65.0 shipped with AGP 4.2.1 so we actually can just add the namespace it should not be a problem.

@krystofwoldrich
Copy link
Member

Based on this comment from the RN proposal we will have to keep the package in the AndroidManifest to ensure RN CLI in older versions recognize the sentry package.

Copy link
Member

@krystofwoldrich krystofwoldrich left a comment

Choose a reason for hiding this comment

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

Successful CI

Thank you @peterlazar1993 for the PR.

@krystofwoldrich krystofwoldrich merged commit 0677344 into getsentry:main Jun 26, 2023
72 of 92 checks passed
@anurag-hugo
Copy link

hey @krystofwoldrich. We have upgraded our react-native version to 0.72.1 and Sentry started throwing an error during the Android app build because of the missing namespace. When is the next release planned?
Thank you.

@krystofwoldrich
Copy link
Member

@anurag-hugo The next release will be in the upcoming days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants