From efb39d25901158498b68a1c909c122904aa6bd59 Mon Sep 17 00:00:00 2001 From: Noah Martin Date: Fri, 8 Aug 2025 15:51:14 -0400 Subject: [PATCH 1/3] feat(V9): Remove SentryRedactviewHelper from API --- CHANGELOG-v9.md | 1 + Sources/SentrySwiftUI/SentryReplayView.swift | 2 +- .../ViewCapture/SentryRedactViewHelper.swift | 14 +- sdk_api.json | 6 +- sdk_api_V9.json | 134 ------------------ 5 files changed, 16 insertions(+), 141 deletions(-) diff --git a/CHANGELOG-v9.md b/CHANGELOG-v9.md index 14ba2eb76c3..7faf26404de 100644 --- a/CHANGELOG-v9.md +++ b/CHANGELOG-v9.md @@ -15,6 +15,7 @@ Removes enableTracing property from SentryOptions (#5694) Removes deprecated `setExtraValue` from SentrySpan (#5864) Removes `integrations` property from `SentryOptions` (#5749) Makes `SentryEventDecodable` internal (#5808) +Removes `SentryRedactviewHelper` from API (#5860) The `span` property on `SentryScope` is now readonly (#5866) ### Fixes diff --git a/Sources/SentrySwiftUI/SentryReplayView.swift b/Sources/SentrySwiftUI/SentryReplayView.swift index ecf94f5d45f..99618466632 100644 --- a/Sources/SentrySwiftUI/SentryReplayView.swift +++ b/Sources/SentrySwiftUI/SentryReplayView.swift @@ -1,5 +1,5 @@ #if canImport(SwiftUI) && canImport(UIKit) && os(iOS) || os(tvOS) -import Sentry +@_spi(Private) import Sentry import SwiftUI import UIKit diff --git a/Sources/Swift/Core/Tools/ViewCapture/SentryRedactViewHelper.swift b/Sources/Swift/Core/Tools/ViewCapture/SentryRedactViewHelper.swift index 769c67765e5..8ba868d1302 100644 --- a/Sources/Swift/Core/Tools/ViewCapture/SentryRedactViewHelper.swift +++ b/Sources/Swift/Core/Tools/ViewCapture/SentryRedactViewHelper.swift @@ -7,15 +7,21 @@ import UIKit import WebKit #endif -@objcMembers -public class SentryRedactViewHelper: NSObject { +#if SDK_V9 +@objcMembers @_spi(Private) public class SentryRedactViewHelper: NSObject { + override private init() {} +} +#else +@objcMembers public class SentryRedactViewHelper: NSObject { + override private init() {} +} +#endif +extension SentryRedactViewHelper { private static var associatedRedactObjectHandle: UInt8 = 0 private static var associatedIgnoreObjectHandle: UInt8 = 0 private static var associatedClipOutObjectHandle: UInt8 = 0 private static var associatedSwiftUIRedactObjectHandle: UInt8 = 0 - override private init() {} - @_spi(Private) public static func maskView(_ view: UIView) { objc_setAssociatedObject(view, &associatedRedactObjectHandle, true, .OBJC_ASSOCIATION_ASSIGN) } diff --git a/sdk_api.json b/sdk_api.json index 0cd8630966b..963f3b391e8 100644 --- a/sdk_api.json +++ b/sdk_api.json @@ -53374,7 +53374,7 @@ } ], "declKind": "Func", - "usr": "c:@M@Sentry@objc(cs)SentryRedactViewHelper(cm)clipOutView:", + "usr": "c:@CM@Sentry@objc(cs)SentryRedactViewHelper(cm)clipOutView:", "mangledName": "$s6Sentry0A16RedactViewHelperC07clipOutC0yySo6UIViewCFZ", "moduleName": "Sentry", "static": true, @@ -53382,6 +53382,7 @@ "Final", "ObjC" ], + "isFromExtension": true, "funcSelfKind": "NonMutating" }, { @@ -53402,7 +53403,7 @@ } ], "declKind": "Func", - "usr": "c:@M@Sentry@objc(cs)SentryRedactViewHelper(cm)maskSwiftUI:", + "usr": "c:@CM@Sentry@objc(cs)SentryRedactViewHelper(cm)maskSwiftUI:", "mangledName": "$s6Sentry0A16RedactViewHelperC11maskSwiftUIyySo6UIViewCFZ", "moduleName": "Sentry", "static": true, @@ -53410,6 +53411,7 @@ "Final", "ObjC" ], + "isFromExtension": true, "funcSelfKind": "NonMutating" } ], diff --git a/sdk_api_V9.json b/sdk_api_V9.json index 1b74b7edcbb..18ee59cc4ee 100644 --- a/sdk_api_V9.json +++ b/sdk_api_V9.json @@ -49885,140 +49885,6 @@ } ] }, - { - "kind": "TypeDecl", - "name": "SentryRedactViewHelper", - "printedName": "SentryRedactViewHelper", - "children": [ - { - "kind": "Function", - "name": "clipOutView", - "printedName": "clipOutView(_:)", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - }, - { - "kind": "TypeNominal", - "name": "UIView", - "printedName": "UIKit.UIView", - "usr": "c:objc(cs)UIView" - } - ], - "declKind": "Func", - "usr": "c:@M@Sentry@objc(cs)SentryRedactViewHelper(cm)clipOutView:", - "mangledName": "$s6Sentry0A16RedactViewHelperC07clipOutC0yySo6UIViewCFZ", - "moduleName": "Sentry", - "static": true, - "declAttributes": [ - "Final", - "ObjC" - ], - "funcSelfKind": "NonMutating" - }, - { - "kind": "Function", - "name": "maskSwiftUI", - "printedName": "maskSwiftUI(_:)", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - }, - { - "kind": "TypeNominal", - "name": "UIView", - "printedName": "UIKit.UIView", - "usr": "c:objc(cs)UIView" - } - ], - "declKind": "Func", - "usr": "c:@M@Sentry@objc(cs)SentryRedactViewHelper(cm)maskSwiftUI:", - "mangledName": "$s6Sentry0A16RedactViewHelperC11maskSwiftUIyySo6UIViewCFZ", - "moduleName": "Sentry", - "static": true, - "declAttributes": [ - "Final", - "ObjC" - ], - "funcSelfKind": "NonMutating" - } - ], - "declKind": "Class", - "usr": "c:@M@Sentry@objc(cs)SentryRedactViewHelper", - "mangledName": "$s6Sentry0A16RedactViewHelperC", - "moduleName": "Sentry", - "declAttributes": [ - "ObjCMembers", - "ObjC" - ], - "superclassUsr": "c:objc(cs)NSObject", - "hasMissingDesignatedInitializers": true, - "inheritsConvenienceInitializers": true, - "superclassNames": [ - "ObjectiveC.NSObject" - ], - "conformances": [ - { - "kind": "Conformance", - "name": "Copyable", - "printedName": "Copyable", - "usr": "s:s8CopyableP", - "mangledName": "$ss8CopyableP" - }, - { - "kind": "Conformance", - "name": "Escapable", - "printedName": "Escapable", - "usr": "s:s9EscapableP", - "mangledName": "$ss9EscapableP" - }, - { - "kind": "Conformance", - "name": "NSObjectProtocol", - "printedName": "NSObjectProtocol", - "usr": "c:objc(pl)NSObject" - }, - { - "kind": "Conformance", - "name": "Equatable", - "printedName": "Equatable", - "usr": "s:SQ", - "mangledName": "$sSQ" - }, - { - "kind": "Conformance", - "name": "Hashable", - "printedName": "Hashable", - "usr": "s:SH", - "mangledName": "$sSH" - }, - { - "kind": "Conformance", - "name": "CVarArg", - "printedName": "CVarArg", - "usr": "s:s7CVarArgP", - "mangledName": "$ss7CVarArgP" - }, - { - "kind": "Conformance", - "name": "CustomStringConvertible", - "printedName": "CustomStringConvertible", - "usr": "s:s23CustomStringConvertibleP", - "mangledName": "$ss23CustomStringConvertibleP" - }, - { - "kind": "Conformance", - "name": "CustomDebugStringConvertible", - "printedName": "CustomDebugStringConvertible", - "usr": "s:s28CustomDebugStringConvertibleP", - "mangledName": "$ss28CustomDebugStringConvertibleP" - } - ] - }, { "kind": "TypeDecl", "name": "SentryTransactionNameSource", From 5c5a96a49470ec1d2523028b8aea008273446051 Mon Sep 17 00:00:00 2001 From: Noah Martin Date: Fri, 15 Aug 2025 19:47:21 -0700 Subject: [PATCH 2/3] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a68206a8a8..1c656291fe6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ ### Improvements - Lazily CharacterSet only once in SentryBaggageSerialization (#5871) +- Moves `SentryRedactViewHelper` methods to an extension (#5860) ## 8.54.1-alpha.1 From 5c6f0090732c90b616bf04c4aec41168bcb800a3 Mon Sep 17 00:00:00 2001 From: Noah Martin Date: Mon, 18 Aug 2025 07:46:52 -0700 Subject: [PATCH 3/3] Update CHANGELOG-v9.md --- CHANGELOG-v9.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG-v9.md b/CHANGELOG-v9.md index 7faf26404de..5583a829bdf 100644 --- a/CHANGELOG-v9.md +++ b/CHANGELOG-v9.md @@ -15,7 +15,7 @@ Removes enableTracing property from SentryOptions (#5694) Removes deprecated `setExtraValue` from SentrySpan (#5864) Removes `integrations` property from `SentryOptions` (#5749) Makes `SentryEventDecodable` internal (#5808) -Removes `SentryRedactviewHelper` from API (#5860) +Removes `SentryRedactViewHelper` from public API (#5860) The `span` property on `SentryScope` is now readonly (#5866) ### Fixes