diff --git a/Sources/Swift/Integrations/SessionReplay/SentrySessionReplay.swift b/Sources/Swift/Integrations/SessionReplay/SentrySessionReplay.swift index f3d23e82312..58a5f3290c3 100644 --- a/Sources/Swift/Integrations/SessionReplay/SentrySessionReplay.swift +++ b/Sources/Swift/Integrations/SessionReplay/SentrySessionReplay.swift @@ -303,7 +303,7 @@ class SentrySessionReplay: NSObject { let screenName = delegate?.currentScreenNameForSessionReplay() - screenshotProvider.image(view: rootView, options: replayOptions) { [weak self] screenshot in + screenshotProvider.image(view: rootView) { [weak self] screenshot in self?.newImage(image: screenshot, forScreen: screenName) } } diff --git a/Sources/Swift/Tools/SentryViewPhotographer.swift b/Sources/Swift/Tools/SentryViewPhotographer.swift index f07fc1c4447..33d22c15e8a 100644 --- a/Sources/Swift/Tools/SentryViewPhotographer.swift +++ b/Sources/Swift/Tools/SentryViewPhotographer.swift @@ -37,7 +37,7 @@ class SentryViewPhotographer: NSObject, SentryViewScreenshotProvider { self.redactBuilder = UIRedactBuilder(options: redactOptions) } - func image(view: UIView, options: SentryRedactOptions, onComplete: @escaping ScreenshotCallback ) { + func image(view: UIView, onComplete: @escaping ScreenshotCallback ) { let redact = redactBuilder.redactRegionsFor(view: view) let image = renderer.render(view: view) diff --git a/Sources/Swift/Tools/SentryViewScreenshotProvider.swift b/Sources/Swift/Tools/SentryViewScreenshotProvider.swift index 7fc012deeb5..0b99bc1bffb 100644 --- a/Sources/Swift/Tools/SentryViewScreenshotProvider.swift +++ b/Sources/Swift/Tools/SentryViewScreenshotProvider.swift @@ -7,7 +7,7 @@ typealias ScreenshotCallback = (UIImage) -> Void @objc protocol SentryViewScreenshotProvider: NSObjectProtocol { - func image(view: UIView, options: SentryRedactOptions, onComplete: @escaping ScreenshotCallback) + func image(view: UIView, onComplete: @escaping ScreenshotCallback) } #endif #endif diff --git a/Tests/SentryTests/Integrations/SessionReplay/SentrySessionReplayTests.swift b/Tests/SentryTests/Integrations/SessionReplay/SentrySessionReplayTests.swift index ed8226cd6cd..c37dccb3727 100644 --- a/Tests/SentryTests/Integrations/SessionReplay/SentrySessionReplayTests.swift +++ b/Tests/SentryTests/Integrations/SessionReplay/SentrySessionReplayTests.swift @@ -7,10 +7,10 @@ import XCTest class SentrySessionReplayTests: XCTestCase { private class ScreenshotProvider: NSObject, SentryViewScreenshotProvider { - var lastImageCall: (view: UIView, options: SentryRedactOptions)? - func image(view: UIView, options: Sentry.SentryRedactOptions, onComplete: @escaping Sentry.ScreenshotCallback) { + var lastImageCall: UIView? + func image(view: UIView, onComplete: @escaping Sentry.ScreenshotCallback) { onComplete(UIImage.add) - lastImageCall = (view, options) + lastImageCall = view } } diff --git a/Tests/SentryTests/SentryViewPhotographerTests.swift b/Tests/SentryTests/SentryViewPhotographerTests.swift index af83a45656d..1b4360bfd4c 100644 --- a/Tests/SentryTests/SentryViewPhotographerTests.swift +++ b/Tests/SentryTests/SentryViewPhotographerTests.swift @@ -19,7 +19,7 @@ class SentryViewPhotographerTests: XCTestCase { return SentryViewPhotographer(renderer: TestViewRenderer(), redactOptions: RedactOptions()) } - private func prepare(views: [UIView], options: any SentryRedactOptions = RedactOptions()) -> UIImage? { + private func prepare(views: [UIView]) -> UIImage? { let rootView = UIView(frame: CGRect(x: 0, y: 0, width: 50, height: 50)) rootView.backgroundColor = .white views.forEach(rootView.addSubview(_:)) @@ -28,7 +28,7 @@ class SentryViewPhotographerTests: XCTestCase { let expect = expectation(description: "Image rendered") var result: UIImage? - sut.image(view: rootView, options: options) { image in + sut.image(view: rootView) { image in result = image expect.fulfill() }