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

Fix: sentryReplayUnmask and sentryReplayUnmask preventing interaction #4749

Merged
merged 2 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Fixed

- Use strlcpy to save session replay info path (#4740)
- `sentryReplayUnmask` and `sentryReplayUnmask` preventing interaction (#4749)

## 8.44.0-beta.1

Expand Down
2 changes: 1 addition & 1 deletion Samples/iOS-SwiftUI/iOS-SwiftUI/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ struct ContentView: View {
}
Button(action: showTTD) {
Text("Show TTD")
}
}.sentryReplayUnmask()
}
VStack(spacing: 16) {
Button(action: {
Expand Down
10 changes: 4 additions & 6 deletions Sources/SentrySwiftUI/SentryReplayView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@ struct SentryReplayView: UIViewRepresentable {
class SentryRedactView: UIView {
}

func makeUIView(context: Context) -> UIView {
let view = SentryRedactView()
view.isUserInteractionEnabled = false
return view
func makeUIView(context: Context) -> SentryRedactView {
return SentryRedactView()
}

func updateUIView(_ uiView: UIView, context: Context) {
func updateUIView(_ uiView: SentryRedactView, context: Context) {
switch maskBehavior {
case .mask: SentryRedactViewHelper.maskSwiftUI(uiView)
case .unmask: SentryRedactViewHelper.clipOutView(uiView)
Expand All @@ -37,7 +35,7 @@ struct SentryReplayView: UIViewRepresentable {
struct SentryReplayModifier: ViewModifier {
let behavior: MaskBehavior
func body(content: Content) -> some View {
content.overlay(SentryReplayView(maskBehavior: behavior))
content.overlay(SentryReplayView(maskBehavior: behavior).disabled(true))
}
}

Expand Down
Loading