Skip to content

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

Draft
cortinico wants to merge 1 commit into
getsentry:mainfrom
cortinico:nc/rn-087
Draft

fix(ios): [RN 0.87] remove unused React/RCTTextView.h import#6322
cortinico wants to merge 1 commit into
getsentry:mainfrom
cortinico:nc/rn-087

Conversation

@cortinico

@cortinico cortinico commented Jun 19, 2026

Copy link
Copy Markdown

📢 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

🤖 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
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.

1 participant