From 94a46e36fadcfd22eec5143198f774a8cffe4135 Mon Sep 17 00:00:00 2001 From: Krystof Woldrich Date: Mon, 26 Aug 2024 18:22:27 +0200 Subject: [PATCH] fix(replay): Mask RCTParagraphComponentView when maskAllText enabled --- CHANGELOG.md | 1 + ios/RNSentryReplay.m | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5167ad5b2f..6c3d5e6a0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ### Fixes - Use `install_modules_dependencies` for React iOS dependencies ([#4040](https://github.com/getsentry/sentry-react-native/pull/4040)) +- `Replay.maskAllText` masks `RCTParagraphComponentView` ([#4048](https://github.com/getsentry/sentry-react-native/pull/4048)) ### Dependencies diff --git a/ios/RNSentryReplay.m b/ios/RNSentryReplay.m index 3693888191..de6a0c240e 100644 --- a/ios/RNSentryReplay.m +++ b/ios/RNSentryReplay.m @@ -57,6 +57,10 @@ + (void)addReplayRNRedactClasses:(NSDictionary *_Nullable)replayOptions { if (maybeRCTTextClass != nil) { [classesToRedact addObject:maybeRCTTextClass]; } + Class _Nullable maybeRCTParagraphComponentViewClass = NSClassFromString(@"RCTParagraphComponentView"); + if (maybeRCTParagraphComponentViewClass != nil) { + [classesToRedact addObject:maybeRCTParagraphComponentViewClass]; + } } [PrivateSentrySDKOnly addReplayRedactClasses:classesToRedact]; }