Skip to content

Commit 701b301

Browse files
authored
Add more SPI (#5498)
1 parent b0e13a7 commit 701b301

23 files changed

+61
-61
lines changed

Sources/Swift/Core/Integrations/ANR/SentryANRTrackerV2Delegate.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ import Foundation
1111
@objcMembers
1212
@_spi(Private) public class SentryANRStoppedResult: NSObject {
1313

14-
let minDuration: TimeInterval
15-
let maxDuration: TimeInterval
14+
public let minDuration: TimeInterval
15+
public let maxDuration: TimeInterval
1616

17-
init(minDuration: TimeInterval, maxDuration: TimeInterval) {
17+
public init(minDuration: TimeInterval, maxDuration: TimeInterval) {
1818
self.minDuration = minDuration
1919
self.maxDuration = maxDuration
2020
}

Sources/Swift/Core/Integrations/ANR/SentryANRType.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import Foundation
3737
}
3838

3939
@objc
40-
static func getFatalExceptionType(nonFatalErrorType: String) -> String {
40+
public static func getFatalExceptionType(nonFatalErrorType: String) -> String {
4141
if nonFatalErrorType == ExceptionType.nonFullyBlocking.rawValue {
4242
return ExceptionType.fatalNonFullyBlocking.rawValue
4343
}

Sources/Swift/Core/Integrations/FramesTracking/SentryFramesDelayResult.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import Foundation
44
@_spi(Private) public class SentryFramesDelayResult: NSObject {
55
/// The frames delay for the passed time period. If frame delay can't be calculated this is -1.
66
public let delayDuration: CFTimeInterval
7-
let framesContributingToDelayCount: UInt
7+
public let framesContributingToDelayCount: UInt
88

99
init(delayDuration: CFTimeInterval, framesContributingToDelayCount: UInt) {
1010
self.delayDuration = delayDuration

Sources/Swift/Core/MetricKit/SentryMXManager.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import MetricKit
3434
self.disableCrashDiagnostics = disableCrashDiagnostics
3535
}
3636

37-
weak var delegate: SentryMXManagerDelegate?
37+
public weak var delegate: SentryMXManagerDelegate?
3838

3939
public func receiveReports() {
4040
let shared = MXMetricManager.shared

Sources/Swift/Core/Tools/ViewCapture/SentryDefaultViewRenderer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import UIKit
55

66
@objcMembers
77
@_spi(Private) public class SentryDefaultViewRenderer: NSObject, SentryViewRenderer {
8-
func render(view: UIView) -> UIImage {
8+
public func render(view: UIView) -> UIImage {
99
let image = UIGraphicsImageRenderer(size: view.bounds.size).image { _ in
1010
view.drawHierarchy(in: view.bounds, afterScreenUpdates: false)
1111
}

Sources/Swift/Core/Tools/ViewCapture/SentryRedactViewHelper.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class SentryRedactViewHelper: NSObject {
1616

1717
override private init() {}
1818

19-
static func maskView(_ view: UIView) {
19+
@_spi(Private) public static func maskView(_ view: UIView) {
2020
objc_setAssociatedObject(view, &associatedRedactObjectHandle, true, .OBJC_ASSOCIATION_ASSIGN)
2121
}
2222

@@ -28,7 +28,7 @@ public class SentryRedactViewHelper: NSObject {
2828
(objc_getAssociatedObject(view, &associatedIgnoreObjectHandle) as? NSNumber)?.boolValue ?? false
2929
}
3030

31-
static func unmaskView(_ view: UIView) {
31+
@_spi(Private) public static func unmaskView(_ view: UIView) {
3232
objc_setAssociatedObject(view, &associatedIgnoreObjectHandle, true, .OBJC_ASSOCIATION_ASSIGN)
3333
}
3434

Sources/Swift/Core/Tools/ViewCapture/SentryViewPhotographer.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import UIKit
2222
/// - enableMaskRendererV2: Flag to enable experimental view renderer.
2323
/// - Note: The option `enableMaskRendererV2` is an internal flag, which is not part of the public API.
2424
/// Therefore, it is not part of the the `redactOptions` parameter, to not further expose it.
25-
init(
25+
public init(
2626
renderer: SentryViewRenderer,
2727
redactOptions: SentryRedactOptions,
2828
enableMaskRendererV2: Bool
@@ -33,7 +33,7 @@ import UIKit
3333
super.init()
3434
}
3535

36-
func image(view: UIView, onComplete: @escaping ScreenshotCallback) {
36+
public func image(view: UIView, onComplete: @escaping ScreenshotCallback) {
3737
let viewSize = view.bounds.size
3838
let redactRegions = redactBuilder.redactRegionsFor(view: view)
3939
// The render method is synchronous and must be called on the main thread.
@@ -50,7 +50,7 @@ import UIKit
5050
}
5151
}
5252

53-
func image(view: UIView) -> UIImage {
53+
public func image(view: UIView) -> UIImage {
5454
let viewSize = view.bounds.size
5555
let redactRegions = redactBuilder.redactRegionsFor(view: view)
5656
let renderedScreenshot = renderer.render(view: view)

Sources/Swift/Core/Tools/ViewCapture/SentryViewRenderer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import UIKit
55

6-
@objc protocol SentryViewRenderer {
6+
@objc @_spi(Private) public protocol SentryViewRenderer {
77
func render(view: UIView) -> UIImage
88
}
99

Sources/Swift/Core/Tools/ViewCapture/SentryViewRendererV2.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import UIKit
77
@_spi(Private) public class SentryViewRendererV2: NSObject, SentryViewRenderer {
88
let enableFastViewRendering: Bool
99

10-
init(enableFastViewRendering: Bool) {
10+
public init(enableFastViewRendering: Bool) {
1111
self.enableFastViewRendering = enableFastViewRendering
1212
}
1313

14-
func render(view: UIView) -> UIImage {
14+
public func render(view: UIView) -> UIImage {
1515
let scale = (view as? UIWindow ?? view.window)?.screen.scale ?? 1
1616
let image = SentryGraphicsImageRenderer(size: view.bounds.size, scale: scale).image { context in
1717
if enableFastViewRendering {

Sources/Swift/Core/Tools/ViewCapture/SentryViewScreenshotProvider.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
import Foundation
44
import UIKit
55

6-
typealias ScreenshotCallback = (_ maskedViewImage: UIImage) -> Void
6+
@_spi(Private) public typealias ScreenshotCallback = (_ maskedViewImage: UIImage) -> Void
77

88
@objc
9-
protocol SentryViewScreenshotProvider: NSObjectProtocol {
9+
@_spi(Private) public protocol SentryViewScreenshotProvider: NSObjectProtocol {
1010
func image(view: UIView, onComplete: @escaping ScreenshotCallback)
1111
}
1212
#endif

0 commit comments

Comments
 (0)