Skip to content

fix(ios): [RN 0.87] remove unused React/RCTTextView.h import#6322

Merged
antonis merged 2 commits into
getsentry:mainfrom
cortinico:nc/rn-087
Jun 22, 2026
Merged

fix(ios): [RN 0.87] remove unused React/RCTTextView.h import#6322
antonis merged 2 commits into
getsentry:mainfrom
cortinico:nc/rn-087

Conversation

@cortinico

@cortinico cortinico commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix

📜 Description

Important

This is needed for this library to work with RN 0.87. Please review/merge and publish a new version of the sentry library on NPM if possible.

packages/core/ios/RNSentryReplay.mm imported React/RCTTextView.h, which has been removed from React Native 0.87 as part of the legacy architecture cleanup (facebook/react-native#56831). This breaks the iOS build with:

RNSentryReplay.mm:5:9: fatal error: 'React/RCTTextView.h' file not found

The import was unusedRCTTextView is only referenced as the runtime string @"RCTTextView" when building the Session Replay redaction class list, so no symbol from the header is needed (@"RCTParagraphComponentView" already covers the Fabric text view). Removing the import restores the build on RN 0.87 while keeping masking behavior identical on older RN versions.

💡 Motivation and Context

React Native 0.87 (currently nightly) deleted Libraries/Text/Text/RCTTextView.h, so any app using @sentry/react-native fails to compile on iOS. Surfaced by the React Native community nightly tests.

https://react-native-community.github.io/nightly-tests/

💚 How did you test it?

  • Static verification: RCTTextView is no longer referenced as a type/symbol anywhere in RNSentryReplay.mm; the only remaining usage is the string literal @"RCTTextView" for replay masking, which is unchanged.
  • Not run in this branch: the full iOS native build / CI (no behavioral change to test beyond compilation).

📝 Checklist

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

RCTTextView.h was removed from React Native 0.87 as part of the legacy
architecture removal (react/react-native#56831), breaking the iOS build with
"'React/RCTTextView.h' file not found".

The import was unused: RCTTextView is only referenced as a runtime string
(@"RCTTextView") for Session Replay text masking, so no symbol from the header
is needed. Removing the import keeps masking working on both old and new
React Native versions (@"RCTParagraphComponentView" already covers Fabric).
@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


  • fix(ios): [RN 0.87] remove unused React/RCTTextView.h import by cortinico in #6322
  • chore(deps): bump actions/setup-java from 5.2.0 to 5.3.0 by dependabot in #6326
  • chore(deps): bump ruby/setup-ruby from 1.313.0 to 1.314.0 by dependabot in #6325
  • chore(deps): update Android SDK to v8.44.1 by github-actions in #6323

🤖 This preview updates automatically when you update the PR.

@cortinico cortinico changed the title fix(ios): remove unused React/RCTTextView.h import fix(ios): [RN 0.87] remove unused React/RCTTextView.h import Jun 19, 2026
@cortinico cortinico marked this pull request as ready for review June 21, 2026 10:39
@cortinico

Copy link
Copy Markdown
Contributor Author

This is ready for review 🙏

@antonis antonis added the ready-to-merge Triggers the full CI test suite label Jun 22, 2026
@antonis antonis enabled auto-merge (squash) June 22, 2026 08:05
@antonis antonis removed the ready-to-merge Triggers the full CI test suite label Jun 22, 2026

@antonis antonis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 🎸
Thank you for your contribution @cortinico 🙇
This will ship in our next release later this week.

ps. I took the liberty of resolving a minor changelog conflict to unblock merging

@antonis antonis merged commit 5182683 into getsentry:main Jun 22, 2026
63 of 65 checks passed
@cortinico

Copy link
Copy Markdown
Contributor Author

LGTM 🎸 Thank you for your contribution @cortinico 🙇 This will ship in our next release later this week.

Thanks for merging this. Looking forward to getting a new release

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.

2 participants