Skip to content

Commit f97a070

Browse files
authored
chore: Add a few SPI (#5475)
1 parent 8047b99 commit f97a070

File tree

83 files changed

+115
-115
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+115
-115
lines changed

SentryTestUtils/TestCurrentDateProvider.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Foundation
2-
@testable import Sentry
2+
@_spi(Private) @testable import Sentry
33

4-
public class TestCurrentDateProvider: SentryCurrentDateProvider {
4+
@_spi(Private) public class TestCurrentDateProvider: SentryCurrentDateProvider {
55

66
public static let defaultStartingDate = Date(timeIntervalSinceReferenceDate: 0)
77

SentryTestUtils/TestDisplayLinkWrapper.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ public class TestDisplayLinkWrapper: SentryDisplayLinkWrapper {
2626
public let slowestSlowFrameDuration: Double
2727
public let fastestFrozenFrameDuration: Double
2828

29-
public var dateProvider: TestCurrentDateProvider
29+
@_spi(Private) public var dateProvider: TestCurrentDateProvider
3030
/// The smallest magnitude of time that is significant to how frames are classified as normal/slow/frozen.
3131
public let timeEpsilon = 0.001
3232

3333
public var _isRunning: Bool = false
3434

35-
public init(dateProvider: TestCurrentDateProvider? = nil) {
35+
@_spi(Private) public init(dateProvider: TestCurrentDateProvider? = nil) {
3636
self.dateProvider = dateProvider ?? TestCurrentDateProvider()
3737

3838
// The test date provider converts the duration from UInt64 to a double back and forth.

SentryTestUtils/TestSentryNSTimerFactory.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Foundation
2-
@testable import Sentry
2+
@_spi(Private) @testable import Sentry
33

44
// We must not subclass NSTimer, see https://developer.apple.com/documentation/foundation/nstimer#1770465.
55
// Therefore we return a NSTimer instance here with TimeInterval.infinity.
@@ -40,7 +40,7 @@ public class TestSentryNSTimerFactory: SentryNSTimerFactory {
4040

4141
private var currentDateProvider: SentryCurrentDateProvider
4242

43-
public init(currentDateProvider: SentryCurrentDateProvider) {
43+
@_spi(Private) public init(currentDateProvider: SentryCurrentDateProvider) {
4444
self.currentDateProvider = currentDateProvider
4545
super.init()
4646
}

SentryTestUtilsTests/TestConstantTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Foundation
2-
@testable import SentryTestUtils
2+
@_spi(Private) @testable import SentryTestUtils
33
import XCTest
44

55
class TestConstantTests: XCTestCase {

SentryTestUtilsTests/TestCurrentDateProviderTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import SentryTestUtils
1+
@_spi(Private) import SentryTestUtils
22
import XCTest
33

44
final class TestCurrentDateProviderTests: XCTestCase {

SentryTestUtilsTests/TestFileManagerTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@testable import SentryTestUtils
1+
@_spi(Private) @testable import SentryTestUtils
22
import XCTest
33

44
class TestFileManagerTests: XCTestCase {

Sources/Swift/Core/Helper/SentryCurrentDateProvider.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import Foundation
55
* Mocking the previous private class from `SentryTestUtils` stopped working in Xcode 16.
66
*/
77
@objc
8-
protocol SentryCurrentDateProvider {
8+
@_spi(Private) public protocol SentryCurrentDateProvider {
99
func date() -> Date
1010
func timezoneOffset() -> Int
1111
func systemTime() -> UInt64

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import Foundation
22

33
@objcMembers
4-
class SentryFramesDelayResult: NSObject {
4+
@_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.
6-
let delayDuration: CFTimeInterval
6+
public let delayDuration: CFTimeInterval
77
let framesContributingToDelayCount: UInt
88

99
init(delayDuration: CFTimeInterval, framesContributingToDelayCount: UInt) {

Sources/Swift/Core/Integrations/Performance/SwizzleClassNameExclude.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import Foundation
22

33
@objcMembers
4-
class SentrySwizzleClassNameExclude: NSObject {
5-
static func shouldExcludeClass(className: String, swizzleClassNameExcludes: Set<String>) -> Bool {
4+
@_spi(Private) public class SentrySwizzleClassNameExclude: NSObject {
5+
public static func shouldExcludeClass(className: String, swizzleClassNameExcludes: Set<String>) -> Bool {
66
for exclude in swizzleClassNameExcludes {
77
if className.contains(exclude) {
88
SentryLog.debug("Excluding class \(className) from swizzling cause it matches the exclude pattern: \(exclude).")

Sources/Swift/Core/Protocol/SentryRedactOptions.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ public protocol SentryRedactOptions {
99
}
1010

1111
@objcMembers
12-
final class SentryRedactDefaultOptions: NSObject, SentryRedactOptions {
13-
var maskAllText: Bool = true
14-
var maskAllImages: Bool = true
15-
var maskedViewClasses: [AnyClass] = []
16-
var unmaskedViewClasses: [AnyClass] = []
12+
@_spi(Private) public final class SentryRedactDefaultOptions: NSObject, SentryRedactOptions {
13+
public var maskAllText: Bool = true
14+
public var maskAllImages: Bool = true
15+
public var maskedViewClasses: [AnyClass] = []
16+
public var unmaskedViewClasses: [AnyClass] = []
1717
}

0 commit comments

Comments
 (0)