From 894e4acfe7dba967e8cf9323da6a89eec0c16a0d Mon Sep 17 00:00:00 2001 From: Noah Martin Date: Tue, 29 Jul 2025 09:05:35 -0400 Subject: [PATCH] ref: Deprecate integrations option --- CHANGELOG-v9.md | 1 + CHANGELOG.md | 1 + SentryTestUtils/TestOptions.swift | 3 + Sources/Sentry/Public/SentryOptions.h | 6 +- Sources/Sentry/SentryOptions.m | 7 +- Sources/Sentry/SentrySDKInternal.m | 7 + Sources/Sentry/SentyOptionsInternal.m | 5 + .../SentryProfilingPublicAPITests.swift | 6 + ...entryCoreDataTrackingIntegrationTest.swift | 2 + .../DataSentryTracingIntegrationTests.swift | 17 +++ .../FileManagerTracingIntegrationTests.swift | 1 + ...SentryFileIOTrackerSwiftHelpersTests.swift | 1 + .../IO/SentryFileIOTrackerTests.swift | 1 + ...SentryFileIOTrackingIntegrationTests.swift | 22 +++ ...SentryNetworkTrackerIntegrationTests.swift | 2 + ...iewControllerPerformanceTrackerTests.swift | 2 + ...SentryUIViewControllerSwizzlingTests.swift | 2 + .../SentryScreenshotIntegrationTests.swift | 3 + .../SentryCrashIntegrationTests.swift | 2 + .../Session/SentrySessionGeneratorTests.swift | 1 + .../SentrySessionReplayIntegrationTests.swift | 1 + .../SentryViewHierarchyIntegrationTests.swift | 6 + Tests/SentryTests/SentryClientTests.swift | 2 + ...SentryCrashInstallationReporterTests.swift | 5 + .../SentryStacktraceBuilderTests.swift | 2 + Tests/SentryTests/SentryOptionsTest.m | 9 ++ .../SentryTests/SentrySDKInternalTests.swift | 44 ++++++ Tests/SentryTests/SentrySDKTests.swift | 27 ++++ sdk_api.json | 6 + sdk_api_V9.json | 131 ------------------ 30 files changed, 190 insertions(+), 135 deletions(-) diff --git a/CHANGELOG-v9.md b/CHANGELOG-v9.md index f6bda8cfb8e..3e75c7737e4 100644 --- a/CHANGELOG-v9.md +++ b/CHANGELOG-v9.md @@ -12,6 +12,7 @@ Removes segment property on SentryUser, SentryBaggage, and SentryTraceContext (# Removes public SentrySerializable conformance from many public models (#5636) Removes Decodable conformances from the public API of model classes (#5691) Removes enableTracing property from SentryOptions (#5694) +Removes `integrations` property from `SentryOptions` (#5749) ### Fixes diff --git a/CHANGELOG.md b/CHANGELOG.md index 5156d1d0725..68ef63b8162 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ - Move continuous profiling payload serialization off of the main thread (#5613) - Improve video generation using apple recommended loop (#5612) - Use -OSize for release builds (#5721) +- Mark The `integrations` parameter of `SentryOptions` as deprecated rather than printing a warning (#5749) ### Fixes diff --git a/SentryTestUtils/TestOptions.swift b/SentryTestUtils/TestOptions.swift index c61d352a8f8..7714f456198 100644 --- a/SentryTestUtils/TestOptions.swift +++ b/SentryTestUtils/TestOptions.swift @@ -2,16 +2,19 @@ import Foundation import Sentry public extension Options { + @available(*, deprecated) func setIntegrations(_ integrations: [AnyClass]) { self.integrations = integrations.map { NSStringFromClass($0) } } + @available(*, deprecated) func removeAllIntegrations() { self.integrations = [] } + @available(*, deprecated) static func noIntegrations() -> Options { let options = Options() options.removeAllIntegrations() diff --git a/Sources/Sentry/Public/SentryOptions.h b/Sources/Sentry/Public/SentryOptions.h index f59461040d5..2b0c567266c 100644 --- a/Sources/Sentry/Public/SentryOptions.h +++ b/Sources/Sentry/Public/SentryOptions.h @@ -191,10 +191,14 @@ NS_SWIFT_NAME(Options) @property (nullable, nonatomic, copy) SentryOnCrashedLastRunCallback onCrashedLastRun NS_SWIFT_SENDABLE; +#if !SDK_V9 /** * Array of integrations to install. */ -@property (nullable, nonatomic, copy) NSArray *integrations; +@property (nullable, nonatomic, copy) NSArray *integrations DEPRECATED_MSG_ATTRIBUTE( + "Setting `SentryOptions.integrations` is deprecated. Integrations should be enabled or " + "disabled using their respective `SentryOptions.enable*` property."); +#endif // !SDK_V9 /** * Array of default integrations. Will be used if @c integrations is @c nil . diff --git a/Sources/Sentry/SentryOptions.m b/Sources/Sentry/SentryOptions.m index 89bfed2a11b..5fa582b2d2e 100644 --- a/Sources/Sentry/SentryOptions.m +++ b/Sources/Sentry/SentryOptions.m @@ -58,7 +58,9 @@ - (instancetype)init self.debug = NO; self.maxBreadcrumbs = defaultMaxBreadcrumbs; self.maxCacheItems = 30; +#if !SDK_V9 _integrations = [SentryOptions defaultIntegrations]; +#endif // !SDK_V9 self.sampleRate = SENTRY_DEFAULT_SAMPLE_RATE; self.enableAutoSessionTracking = YES; self.enableGraphQLOperationTracking = NO; @@ -208,13 +210,12 @@ - (void)setFailedRequestTargets:(NSArray *)failedRequestTargets _failedRequestTargets = failedRequestTargets; } +#if !SDK_V9 - (void)setIntegrations:(NSArray *)integrations { - SENTRY_LOG_WARN( - @"Setting `SentryOptions.integrations` is deprecated. Integrations should be enabled or " - @"disabled using their respective `SentryOptions.enable*` property."); _integrations = integrations.mutableCopy; } +#endif // !SDK_V9 - (void)setDsn:(NSString *)dsn { diff --git a/Sources/Sentry/SentrySDKInternal.m b/Sources/Sentry/SentrySDKInternal.m index b7b91eecd2a..ca4e2f2f34d 100644 --- a/Sources/Sentry/SentrySDKInternal.m +++ b/Sources/Sentry/SentrySDKInternal.m @@ -560,8 +560,15 @@ + (void)installIntegrations return; } SentryOptions *options = [SentrySDKInternal.currentHub getClient].options; +#if SDK_V9 + NSMutableArray *integrationNames = [SentryOptions defaultIntegrations].mutableCopy; +#else +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wdeprecated-declarations" NSMutableArray *integrationNames = [SentrySDKInternal.currentHub getClient].options.integrations.mutableCopy; +# pragma clang diagnostic pop +#endif // SDK_V9 NSArray *defaultIntegrations = SentryOptionsInternal.defaultIntegrationClasses; diff --git a/Sources/Sentry/SentyOptionsInternal.m b/Sources/Sentry/SentyOptionsInternal.m index 2147a21fc72..387a17ed8f0 100644 --- a/Sources/Sentry/SentyOptionsInternal.m +++ b/Sources/Sentry/SentyOptionsInternal.m @@ -190,10 +190,15 @@ + (BOOL)validateOptions:(NSDictionary *)options sentryOptions.onCrashedLastRun = options[@"onCrashedLastRun"]; } +#if !SDK_V9 if ([options[@"integrations"] isKindOfClass:[NSArray class]]) { +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wdeprecated-declarations" sentryOptions.integrations = [[options[@"integrations"] filteredArrayUsingPredicate:isNSString] mutableCopy]; +# pragma clang diagnstic pop } +#endif // !SDK_V9 if ([options[@"sampleRate"] isKindOfClass:[NSNumber class]]) { sentryOptions.sampleRate = options[@"sampleRate"]; diff --git a/Tests/SentryProfilerTests/SentryProfilingPublicAPITests.swift b/Tests/SentryProfilerTests/SentryProfilingPublicAPITests.swift index 2171889179a..0552de089f9 100644 --- a/Tests/SentryProfilerTests/SentryProfilingPublicAPITests.swift +++ b/Tests/SentryProfilerTests/SentryProfilingPublicAPITests.swift @@ -7,6 +7,7 @@ import XCTest // swiftlint:disable file_length class SentryProfilingPublicAPITests: XCTestCase { private class Fixture { + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") let options: Options = { let options = Options.noIntegrations() options.dsn = TestConstants.dsnAsString(username: "SentrySDKTests") @@ -35,7 +36,9 @@ class SentryProfilingPublicAPITests: XCTestCase { let currentDate = TestCurrentDateProvider() lazy var timerFactory = TestSentryNSTimerFactory(currentDateProvider: currentDate) + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") lazy var client = TestClient(options: options)! + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") lazy var hub = SentryHub(client: client, andScope: scope) } @@ -52,6 +55,7 @@ class SentryProfilingPublicAPITests: XCTestCase { SentryDependencyContainer.sharedInstance().dateProvider = fixture.currentDate } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") override func tearDown() { super.tearDown() @@ -668,12 +672,14 @@ extension SentryProfilingPublicAPITests { } private extension SentryProfilingPublicAPITests { + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func givenSdkWithHub() { SentrySDKInternal.setCurrentHub(fixture.hub) SentrySDKInternal.setStart(with: fixture.options) sentry_sdkInitProfilerTasks(fixture.options, fixture.hub) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func givenSdkWithHubButNoClient() { SentrySDKInternal.setCurrentHub(SentryHub(client: nil, andScope: nil)) SentrySDKInternal.setStart(with: fixture.options) diff --git a/Tests/SentryTests/Integrations/Performance/CoreData/SentryCoreDataTrackingIntegrationTest.swift b/Tests/SentryTests/Integrations/Performance/CoreData/SentryCoreDataTrackingIntegrationTest.swift index 8653ae43438..d422b02dcf4 100644 --- a/Tests/SentryTests/Integrations/Performance/CoreData/SentryCoreDataTrackingIntegrationTest.swift +++ b/Tests/SentryTests/Integrations/Performance/CoreData/SentryCoreDataTrackingIntegrationTest.swift @@ -9,6 +9,7 @@ class SentryCoreDataTrackingIntegrationTests: XCTestCase { let options: Options let coreDataStack: TestCoreDataStack + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") init(testName: String) { coreDataStack = TestCoreDataStack(databaseFilename: "db-\(testName.hashValue).sqlite") options = Options() @@ -24,6 +25,7 @@ class SentryCoreDataTrackingIntegrationTests: XCTestCase { private var fixture: Fixture! + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") override func setUp() { super.setUp() fixture = Fixture(testName: self.name) diff --git a/Tests/SentryTests/Integrations/Performance/IO/DataSentryTracingIntegrationTests.swift b/Tests/SentryTests/Integrations/Performance/IO/DataSentryTracingIntegrationTests.swift index bbbb868d034..0444dc8413f 100644 --- a/Tests/SentryTests/Integrations/Performance/IO/DataSentryTracingIntegrationTests.swift +++ b/Tests/SentryTests/Integrations/Performance/IO/DataSentryTracingIntegrationTests.swift @@ -20,6 +20,7 @@ class DataSentryTracingIntegrationTests: XCTestCase { init() {} + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func getSut(testName: String, isSDKEnabled: Bool = true, isEnabled: Bool = true) throws -> Data { let fileManager = FileManager.default let tempDirUrl = URL(fileURLWithPath: NSTemporaryDirectory()) @@ -130,6 +131,7 @@ class DataSentryTracingIntegrationTests: XCTestCase { // MARK: - Data.init(contentsOfWithSentryTracing:) + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testInitContentsOfWithSentryTracing_shouldTraceManually() throws { // -- Arrange -- let expectedData = try fixture.getSut(testName: self.name) @@ -159,6 +161,7 @@ class DataSentryTracingIntegrationTests: XCTestCase { XCTAssertGreaterThan(endTimestamp.timeIntervalSince1970, startTimestamp.timeIntervalSince1970) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testInitContentsOfWithSentryTracingWithOptions_shouldPassOptionsToSystemImplementation() throws { // -- Arrange -- let expectedData = try fixture.getSut(testName: self.name) @@ -186,6 +189,7 @@ class DataSentryTracingIntegrationTests: XCTestCase { XCTAssertEqual(mappedSentryData, expectedData) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testInitContentsOfWithSentryTracing_throwsError_shouldTraceManuallyWithErrorRethrow() throws { // -- Arrange -- let _ = try fixture.getSut(testName: self.name) @@ -212,6 +216,7 @@ class DataSentryTracingIntegrationTests: XCTestCase { XCTAssertGreaterThan(endTimestamp.timeIntervalSince1970, startTimestamp.timeIntervalSince1970) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testInitContentsOfWithSentryTracing_nonFileUrl_shouldNotTraceManually() throws { // -- Arrange -- let _ = try fixture.getSut(testName: self.name) @@ -225,6 +230,7 @@ class DataSentryTracingIntegrationTests: XCTestCase { XCTAssertEqual(parentTransaction.children.count, 0) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testInitContentsOfWithSentryTracing_trackerIsNotEnabled_shouldNotTraceManually() throws { // -- Arrange -- let _ = try fixture.getSut(testName: self.name, isEnabled: false) @@ -238,6 +244,7 @@ class DataSentryTracingIntegrationTests: XCTestCase { XCTAssertEqual(parentTransaction.children.count, 0) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testInitContentsOfWithSentryTracing_fileIsIgnored_shouldNotTraceManually() throws { // -- Arrange -- let _ = try fixture.getSut(testName: self.name) @@ -251,6 +258,7 @@ class DataSentryTracingIntegrationTests: XCTestCase { XCTAssertEqual(parentTransaction.children.count, 0) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testInitContentsOfWithSentryTracing_SDKIsNotStarted_shouldReadData() throws { // -- Arrange -- let _ = try fixture.getSut(testName: self.name, isSDKEnabled: false) @@ -263,6 +271,7 @@ class DataSentryTracingIntegrationTests: XCTestCase { XCTAssertEqual(data, fixture.data) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testInitContentsOfWithSentryTracing_SDKIsClosed_shouldReadData() throws { // -- Arrange -- let _ = try fixture.getSut(testName: self.name) @@ -278,6 +287,7 @@ class DataSentryTracingIntegrationTests: XCTestCase { // MARK: - Data.writeWithSentryTracing(to:) + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testWriteWithSentryTracing_shouldTraceManuallyWithErrorRethrow() throws { // -- Arrange -- let sut: Data = try fixture.getSut(testName: self.name) @@ -313,6 +323,7 @@ class DataSentryTracingIntegrationTests: XCTestCase { XCTAssertGreaterThan(endTimestamp.timeIntervalSince1970, startTimestamp.timeIntervalSince1970) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testWriteWithSentryTracingWithOptions_shouldPassOptionsToSystemImplementation() throws { // -- Arrange -- let sut: Data = try fixture.getSut(testName: self.name) @@ -344,6 +355,7 @@ class DataSentryTracingIntegrationTests: XCTestCase { XCTAssertEqual(writtenData, sut) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testWriteWithSentryTracing_throwsError_shouldTraceManuallyWithErrorRethrow() throws { // -- Arrange -- let sut: Data = try fixture.getSut(testName: self.name) @@ -370,6 +382,7 @@ class DataSentryTracingIntegrationTests: XCTestCase { XCTAssertGreaterThan(endTimestamp.timeIntervalSince1970, startTimestamp.timeIntervalSince1970) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testWriteWithSentryTracing_nonFileUrl_shouldNotTraceManually() throws { // -- Arrange -- let sut: Data = try fixture.getSut(testName: self.name) @@ -382,6 +395,7 @@ class DataSentryTracingIntegrationTests: XCTestCase { XCTAssertEqual(parentTransaction.children.count, 0) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testWriteWithSentryTracing_trackerIsNotEnabled_shouldNotTraceManually() throws { // -- Arrange -- let sut: Data = try fixture.getSut(testName: self.name, isEnabled: false) @@ -394,6 +408,7 @@ class DataSentryTracingIntegrationTests: XCTestCase { XCTAssertEqual(parentTransaction.children.count, 0) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testWriteWithSentryTracing_fileIsIgnored_shouldNotTraceManually() throws { // -- Arrange -- let sut: Data = try fixture.getSut(testName: self.name) @@ -413,6 +428,7 @@ class DataSentryTracingIntegrationTests: XCTestCase { XCTAssertEqual(parentTransaction.children.count, 0) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testWriteWithSentryTracing_SDKIsNotStarted_shouldWriteFile() throws { // -- Arrange -- let sut: Data = try fixture.getSut(testName: self.name, isSDKEnabled: false) @@ -431,6 +447,7 @@ class DataSentryTracingIntegrationTests: XCTestCase { XCTAssertEqual(writtenData, fixture.data) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testWriteWithSentryTracing_SDKIsClosed_shouldWriteFile() throws { // -- Arrange -- let sut: Data = try fixture.getSut(testName: self.name) diff --git a/Tests/SentryTests/Integrations/Performance/IO/FileManagerTracingIntegrationTests.swift b/Tests/SentryTests/Integrations/Performance/IO/FileManagerTracingIntegrationTests.swift index bed6c3b9fb7..e1cfe2c53fe 100644 --- a/Tests/SentryTests/Integrations/Performance/IO/FileManagerTracingIntegrationTests.swift +++ b/Tests/SentryTests/Integrations/Performance/IO/FileManagerTracingIntegrationTests.swift @@ -3,6 +3,7 @@ @_spi(Private) import SentryTestUtils import XCTest +@available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") class FileManagerSentryTracingIntegrationTests: XCTestCase { private class Fixture { let mockDateProvider: TestCurrentDateProvider = { diff --git a/Tests/SentryTests/Integrations/Performance/IO/SentryFileIOTrackerSwiftHelpersTests.swift b/Tests/SentryTests/Integrations/Performance/IO/SentryFileIOTrackerSwiftHelpersTests.swift index ac9c24a87eb..5557bb1ea96 100644 --- a/Tests/SentryTests/Integrations/Performance/IO/SentryFileIOTrackerSwiftHelpersTests.swift +++ b/Tests/SentryTests/Integrations/Performance/IO/SentryFileIOTrackerSwiftHelpersTests.swift @@ -20,6 +20,7 @@ class SentryFileIOTrackerSwiftHelpersTests: XCTestCase { private let destPath = "/path/to/dest" private let testError = NSError(domain: "Test", code: 1, userInfo: nil) + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") override func setUp() { mockedDateProvider = TestCurrentDateProvider() SentryDependencyContainer.sharedInstance().dateProvider = mockedDateProvider diff --git a/Tests/SentryTests/Integrations/Performance/IO/SentryFileIOTrackerTests.swift b/Tests/SentryTests/Integrations/Performance/IO/SentryFileIOTrackerTests.swift index a8322b00ef7..c587b1ac02b 100644 --- a/Tests/SentryTests/Integrations/Performance/IO/SentryFileIOTrackerTests.swift +++ b/Tests/SentryTests/Integrations/Performance/IO/SentryFileIOTrackerTests.swift @@ -33,6 +33,7 @@ class SentryFileIOTrackerTests: XCTestCase { private var fixture: Fixture! + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") override func setUp() { super.setUp() fixture = Fixture() diff --git a/Tests/SentryTests/Integrations/Performance/IO/SentryFileIOTrackingIntegrationTests.swift b/Tests/SentryTests/Integrations/Performance/IO/SentryFileIOTrackingIntegrationTests.swift index 4aea168ee45..913a7230f21 100644 --- a/Tests/SentryTests/Integrations/Performance/IO/SentryFileIOTrackingIntegrationTests.swift +++ b/Tests/SentryTests/Integrations/Performance/IO/SentryFileIOTrackingIntegrationTests.swift @@ -11,6 +11,7 @@ class SentryFileIOTrackingIntegrationTests: XCTestCase { let fileURL: URL! let fileDirectory: URL! + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func getOptions(enableAutoPerformanceTracing: Bool = true, enableFileIOTracing: Bool = true, enableSwizzling: Bool = true, enableDataSwizzling: Bool = true, enableFileManagerSwizzling: Bool = true, tracesSampleRate: NSNumber = 1) -> Options { let result = Options() result.enableAutoPerformanceTracing = enableAutoPerformanceTracing @@ -68,6 +69,7 @@ class SentryFileIOTrackingIntegrationTests: XCTestCase { SentrySDK.close() } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func test_WritingTrackingDisabled_forIOOption() { // -- Act -- SentrySDK.start(options: fixture.getOptions(enableFileIOTracing: false)) @@ -76,6 +78,7 @@ class SentryFileIOTrackingIntegrationTests: XCTestCase { assertWriteWithNoSpans() } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func test_WritingTrackingDisabled_forSwizzlingOption() { // -- Act -- SentrySDK.start(options: fixture.getOptions(enableSwizzling: false)) @@ -84,6 +87,7 @@ class SentryFileIOTrackingIntegrationTests: XCTestCase { assertWriteWithNoSpans() } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func test_WritingTrackingDisabled_forAutoPerformanceTrackingOption() { // -- Act -- SentrySDK.start(options: fixture.getOptions(enableAutoPerformanceTracing: false)) @@ -92,6 +96,7 @@ class SentryFileIOTrackingIntegrationTests: XCTestCase { assertWriteWithNoSpans() } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func test_WritingTrackingDisabled_TracingDisabled() { // -- Act -- SentrySDK.start(options: fixture.getOptions(tracesSampleRate: 0)) @@ -100,6 +105,7 @@ class SentryFileIOTrackingIntegrationTests: XCTestCase { assertWriteWithNoSpans() } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testData_Writing_Tracking() { // -- Arrange -- let expectedSpanCount: Int @@ -121,6 +127,7 @@ class SentryFileIOTrackingIntegrationTests: XCTestCase { } } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testData_WritingWithOption_Tracking() { // -- Arrange -- let expectedSpanCount: Int @@ -142,6 +149,7 @@ class SentryFileIOTrackingIntegrationTests: XCTestCase { } } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func test_ReadingTrackingDisabled_forIOOption() { // -- Act -- SentrySDK.start(options: fixture.getOptions(enableFileIOTracing: false)) @@ -150,6 +158,7 @@ class SentryFileIOTrackingIntegrationTests: XCTestCase { assertWriteWithNoSpans() } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func test_ReadingTrackingDisabled_forSwizzlingOption() { // -- Act -- SentrySDK.start(options: fixture.getOptions(enableSwizzling: false)) @@ -158,6 +167,7 @@ class SentryFileIOTrackingIntegrationTests: XCTestCase { assertWriteWithNoSpans() } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func test_ReadingTrackingDisabled_forAutoPerformanceTrackingOption() { // -- Act -- SentrySDK.start(options: fixture.getOptions(enableAutoPerformanceTracing: false)) @@ -166,6 +176,7 @@ class SentryFileIOTrackingIntegrationTests: XCTestCase { assertWriteWithNoSpans() } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func test_ReadingTrackingDisabled_TracingDisabled() { // -- Act -- SentrySDK.start(options: fixture.getOptions(tracesSampleRate: 0)) @@ -174,6 +185,7 @@ class SentryFileIOTrackingIntegrationTests: XCTestCase { assertWriteWithNoSpans() } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testData_ReadingURL_Tracking() { // -- Arrange -- let expectedSpanCount: Int @@ -193,6 +205,7 @@ class SentryFileIOTrackingIntegrationTests: XCTestCase { } } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testData_ReadingURLWithOption_Tracking() throws { // -- Arrange -- let expectedSpanCount: Int @@ -213,6 +226,7 @@ class SentryFileIOTrackingIntegrationTests: XCTestCase { XCTAssertEqual(data?.count, fixture.data.count) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func test_ReadingFile_Tracking() { // -- Arrange -- SentrySDK.start(options: fixture.getOptions()) @@ -224,6 +238,7 @@ class SentryFileIOTrackingIntegrationTests: XCTestCase { XCTAssertEqual(data?.count, fixture.data.count) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func test_ReadingFileWithOptions_Tracking() { // -- Arrange -- SentrySDK.start(options: fixture.getOptions()) @@ -235,6 +250,7 @@ class SentryFileIOTrackingIntegrationTests: XCTestCase { XCTAssertEqual(data?.count, fixture.data.count) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func test_ReadingBigFile() { // -- Arrange -- SentrySDK.start(options: fixture.getOptions()) @@ -249,6 +265,7 @@ class SentryFileIOTrackingIntegrationTests: XCTestCase { XCTAssertEqual(data?.count, 295_760) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func test_WritingBigFile() { // -- Arrange -- guard let jsonFile = getBigFilePath() else { @@ -278,6 +295,7 @@ class SentryFileIOTrackingIntegrationTests: XCTestCase { ?? bundle.path(forResource: "fatal-error-binary-images-message2", ofType: "json") } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func test_DataConsistency_readUrl() { SentrySDK.start(options: fixture.getOptions()) @@ -292,6 +310,7 @@ class SentryFileIOTrackingIntegrationTests: XCTestCase { XCTAssertEqual(randomValue, readValue) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func test_DataConsistency_readPath() { SentrySDK.start(options: fixture.getOptions()) @@ -305,6 +324,7 @@ class SentryFileIOTrackingIntegrationTests: XCTestCase { XCTAssertEqual(randomValue, readValue) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testEnableDataSwizzling_isNotEnabled_shouldNotSwizzleNSDataMethods() { // -- Arrange -- let options = fixture.getOptions(enableDataSwizzling: false) @@ -314,6 +334,7 @@ class SentryFileIOTrackingIntegrationTests: XCTestCase { assertWriteWithNoSpans() } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testDisableFileManagerSwizzling_isNotEnabledAndDataSwizzlingIsEnabled_shouldTrackWithSpan() throws { // -- Arrange -- if #available(iOS 18, macOS 15, tvOS 18, *) { @@ -329,6 +350,7 @@ class SentryFileIOTrackingIntegrationTests: XCTestCase { } } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testDisableFileManagerSwizzling_isNotEnabled_shouldNotTrackWithSpan() throws { // -- Arrange -- if #available(iOS 18, macOS 15, tvOS 18, *) { diff --git a/Tests/SentryTests/Integrations/Performance/Network/SentryNetworkTrackerIntegrationTests.swift b/Tests/SentryTests/Integrations/Performance/Network/SentryNetworkTrackerIntegrationTests.swift index 52d24bd7b17..fbe2f9e42bc 100644 --- a/Tests/SentryTests/Integrations/Performance/Network/SentryNetworkTrackerIntegrationTests.swift +++ b/Tests/SentryTests/Integrations/Performance/Network/SentryNetworkTrackerIntegrationTests.swift @@ -16,6 +16,7 @@ class SentryNetworkTrackerIntegrationTests: XCTestCase { let dateProvider = TestCurrentDateProvider() let options: Options + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") init() { options = Options() options.dsn = SentryNetworkTrackerIntegrationTests.dsnAsString @@ -26,6 +27,7 @@ class SentryNetworkTrackerIntegrationTests: XCTestCase { private var fixture: Fixture! + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") override func setUp() { super.setUp() fixture = Fixture() diff --git a/Tests/SentryTests/Integrations/Performance/UIViewController/SentryUIViewControllerPerformanceTrackerTests.swift b/Tests/SentryTests/Integrations/Performance/UIViewController/SentryUIViewControllerPerformanceTrackerTests.swift index ae3976ded1f..bb025e4f016 100644 --- a/Tests/SentryTests/Integrations/Performance/UIViewController/SentryUIViewControllerPerformanceTrackerTests.swift +++ b/Tests/SentryTests/Integrations/Performance/UIViewController/SentryUIViewControllerPerformanceTrackerTests.swift @@ -41,6 +41,7 @@ class SentryUIViewControllerPerformanceTrackerTests: XCTestCase { return SentryInAppLogic(inAppIncludes: options.inAppIncludes, inAppExcludes: []) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") init() { options = Options.noIntegrations() let imageName = String( @@ -67,6 +68,7 @@ class SentryUIViewControllerPerformanceTrackerTests: XCTestCase { private var fixture: Fixture! + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") override func setUp() { super.setUp() fixture = Fixture() diff --git a/Tests/SentryTests/Integrations/Performance/UIViewController/SentryUIViewControllerSwizzlingTests.swift b/Tests/SentryTests/Integrations/Performance/UIViewController/SentryUIViewControllerSwizzlingTests.swift index 62d1fd87b2c..98654561b1d 100644 --- a/Tests/SentryTests/Integrations/Performance/UIViewController/SentryUIViewControllerSwizzlingTests.swift +++ b/Tests/SentryTests/Integrations/Performance/UIViewController/SentryUIViewControllerSwizzlingTests.swift @@ -15,6 +15,7 @@ class SentryUIViewControllerSwizzlingTests: XCTestCase { let binaryImageCache: SentryBinaryImageCache var options: Options + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") init() { subClassFinder = TestSubClassFinder(dispatchQueue: dispatchQueue, objcRuntimeWrapper: objcRuntimeWrapper, swizzleClassNameExcludes: []) binaryImageCache = SentryDependencyContainer.sharedInstance().binaryImageCache @@ -48,6 +49,7 @@ class SentryUIViewControllerSwizzlingTests: XCTestCase { private var fixture: Fixture! + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") override func setUp() { super.setUp() fixture = Fixture() diff --git a/Tests/SentryTests/Integrations/Screenshot/SentryScreenshotIntegrationTests.swift b/Tests/SentryTests/Integrations/Screenshot/SentryScreenshotIntegrationTests.swift index 27b2e168d3f..75ed3f0f818 100644 --- a/Tests/SentryTests/Integrations/Screenshot/SentryScreenshotIntegrationTests.swift +++ b/Tests/SentryTests/Integrations/Screenshot/SentryScreenshotIntegrationTests.swift @@ -35,6 +35,7 @@ class SentryScreenshotIntegrationTests: XCTestCase { clearTestState() } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func test_attachScreenshot_disabled() { SentrySDK.start { $0.attachScreenshot = false @@ -44,6 +45,7 @@ class SentryScreenshotIntegrationTests: XCTestCase { XCTAssertFalse(sentrycrash_hasSaveScreenshotCallback()) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func test_attachScreenshot_enabled() { SentrySDK.start { $0.attachScreenshot = true @@ -53,6 +55,7 @@ class SentryScreenshotIntegrationTests: XCTestCase { XCTAssertTrue(sentrycrash_hasSaveScreenshotCallback()) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func test_uninstall() { SentrySDK.start { $0.attachScreenshot = true diff --git a/Tests/SentryTests/Integrations/SentryCrash/SentryCrashIntegrationTests.swift b/Tests/SentryTests/Integrations/SentryCrash/SentryCrashIntegrationTests.swift index cd51e841096..fc6c2464289 100644 --- a/Tests/SentryTests/Integrations/SentryCrash/SentryCrashIntegrationTests.swift +++ b/Tests/SentryTests/Integrations/SentryCrash/SentryCrashIntegrationTests.swift @@ -77,6 +77,7 @@ class SentryCrashIntegrationTests: NotificationCenterTestCase { } // Test for GH-581 + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testReleaseNamePassedToSentryCrash() throws { let releaseName = "1.0.0" let dist = "14G60" @@ -95,6 +96,7 @@ class SentryCrashIntegrationTests: NotificationCenterTestCase { assertUserInfoField(userInfo: userInfo, key: "dist", expected: dist) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testContext_IsPassedToSentryCrash() throws { SentrySDK.start { options in options.dsn = SentryCrashIntegrationTests.dsnAsString diff --git a/Tests/SentryTests/Integrations/Session/SentrySessionGeneratorTests.swift b/Tests/SentryTests/Integrations/Session/SentrySessionGeneratorTests.swift index f2b7cfebc42..dc51dfeadc1 100644 --- a/Tests/SentryTests/Integrations/Session/SentrySessionGeneratorTests.swift +++ b/Tests/SentryTests/Integrations/Session/SentrySessionGeneratorTests.swift @@ -22,6 +22,7 @@ class SentrySessionGeneratorTests: NotificationCenterTestCase { private var options: Options! private var fileManager: SentryFileManager! + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") override func setUp() { super.setUp() diff --git a/Tests/SentryTests/Integrations/SessionReplay/SentrySessionReplayIntegrationTests.swift b/Tests/SentryTests/Integrations/SessionReplay/SentrySessionReplayIntegrationTests.swift index cf2e95cce8d..556a0e31574 100644 --- a/Tests/SentryTests/Integrations/SessionReplay/SentrySessionReplayIntegrationTests.swift +++ b/Tests/SentryTests/Integrations/SessionReplay/SentrySessionReplayIntegrationTests.swift @@ -5,6 +5,7 @@ import XCTest #if os(iOS) || os(tvOS) +@available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") class SentrySessionReplayIntegrationTests: XCTestCase { private class TestSentryUIApplication: SentryUIApplication { diff --git a/Tests/SentryTests/Integrations/ViewHierarchy/SentryViewHierarchyIntegrationTests.swift b/Tests/SentryTests/Integrations/ViewHierarchy/SentryViewHierarchyIntegrationTests.swift index 640e670ab21..d18aa578aa0 100644 --- a/Tests/SentryTests/Integrations/ViewHierarchy/SentryViewHierarchyIntegrationTests.swift +++ b/Tests/SentryTests/Integrations/ViewHierarchy/SentryViewHierarchyIntegrationTests.swift @@ -35,6 +35,7 @@ class SentryViewHierarchyIntegrationTests: XCTestCase { clearTestState() } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func test_attachViewHierarchy() { SentrySDK.start { $0.attachViewHierarchy = false @@ -44,6 +45,7 @@ class SentryViewHierarchyIntegrationTests: XCTestCase { XCTAssertFalse(sentrycrash_hasSaveViewHierarchyCallback()) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func test_attachViewHierarchy_enabled() { SentrySDK.start { $0.attachViewHierarchy = true @@ -53,6 +55,7 @@ class SentryViewHierarchyIntegrationTests: XCTestCase { XCTAssertTrue(sentrycrash_hasSaveViewHierarchyCallback()) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func test_uninstall() { SentrySDK.start { $0.attachViewHierarchy = true @@ -63,6 +66,7 @@ class SentryViewHierarchyIntegrationTests: XCTestCase { XCTAssertFalse(sentrycrash_hasSaveViewHierarchyCallback()) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func test_integrationAddFileName() { SentrySDK.start { $0.attachViewHierarchy = true @@ -168,6 +172,7 @@ class SentryViewHierarchyIntegrationTests: XCTestCase { wait(for: [ex], timeout: 1) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testReportAccessibilityIdentifierTrue() { SentrySDK.start { $0.attachViewHierarchy = true @@ -176,6 +181,7 @@ class SentryViewHierarchyIntegrationTests: XCTestCase { XCTAssertTrue(SentryDependencyContainer.sharedInstance().viewHierarchyProvider.reportAccessibilityIdentifier) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testReportAccessibilityIdentifierFalse() { SentrySDK.start { $0.attachViewHierarchy = true diff --git a/Tests/SentryTests/SentryClientTests.swift b/Tests/SentryTests/SentryClientTests.swift index b817d59767b..af9f90e8895 100644 --- a/Tests/SentryTests/SentryClientTests.swift +++ b/Tests/SentryTests/SentryClientTests.swift @@ -5,6 +5,7 @@ import XCTest // swiftlint:disable file_length // We are aware that the client has a lot of logic and we should maybe // move some of it to other classes. +@available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") class SentryClientTest: XCTestCase { private static let dsn = TestConstants.dsnAsString(username: "SentryClientTest") @@ -2164,6 +2165,7 @@ class SentryClientTest: XCTestCase { #endif // os(macOS) } +@available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") private extension SentryClientTest { private func givenEventWithDebugMeta() -> Event { let event = Event(level: SentryLevel.fatal) diff --git a/Tests/SentryTests/SentryCrash/SentryCrashInstallationReporterTests.swift b/Tests/SentryTests/SentryCrash/SentryCrashInstallationReporterTests.swift index 5ea127db4cb..a6d3338d9a2 100644 --- a/Tests/SentryTests/SentryCrash/SentryCrashInstallationReporterTests.swift +++ b/Tests/SentryTests/SentryCrash/SentryCrashInstallationReporterTests.swift @@ -14,6 +14,7 @@ class SentryCrashInstallationReporterTests: XCTestCase { sut.uninstall() } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testReportIsSentAndDeleted() throws { givenSutWithStartedSDK() @@ -30,6 +31,7 @@ class SentryCrashInstallationReporterTests: XCTestCase { /** * Validates that handling a crash report with the removed fields total_storage and free_storage works. */ + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testShouldCaptureCrashReportWithLegacyStorageInfo() throws { givenSutWithStartedSDK() @@ -48,6 +50,7 @@ class SentryCrashInstallationReporterTests: XCTestCase { XCTAssertEqual(event?.context?["device"]?["storage_size"] as? Int, 994_662_584_320) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testShouldCaptureCrashReportWithoutDeviceContext() throws { givenSutWithStartedSDK() @@ -65,6 +68,7 @@ class SentryCrashInstallationReporterTests: XCTestCase { XCTAssertEqual(event?.context?["app"]?["app_name"] as? String, "iOS-Swift") } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testFaultyReportIsNotSentAndDeleted() throws { givenSutWithStartedSDK() @@ -78,6 +82,7 @@ class SentryCrashInstallationReporterTests: XCTestCase { XCTAssertEqual(sentrycrash_getReportCount(), 0) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") private func givenSutWithStartedSDK() { let options = Options() options.dsn = TestConstants.dsnAsString(username: "SentryCrashInstallationReporterTests") diff --git a/Tests/SentryTests/SentryCrash/SentryStacktraceBuilderTests.swift b/Tests/SentryTests/SentryCrash/SentryStacktraceBuilderTests.swift index e546ae71fee..f0431a7075d 100644 --- a/Tests/SentryTests/SentryCrash/SentryStacktraceBuilderTests.swift +++ b/Tests/SentryTests/SentryCrash/SentryStacktraceBuilderTests.swift @@ -78,6 +78,7 @@ class SentryStacktraceBuilderTests: XCTestCase { XCTAssertTrue(filteredFrames.count == 1, "The frames must be ordered from caller to callee, or oldest to youngest.") } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testConcurrentStacktraces() throws { guard #available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) else { throw XCTSkip("Not available for earlier platform versions") @@ -101,6 +102,7 @@ class SentryStacktraceBuilderTests: XCTestCase { wait(for: [waitForAsyncToRun], timeout: 10) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testConcurrentStacktraces_noStitching() throws { guard #available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) else { throw XCTSkip("Not available for earlier platform versions") diff --git a/Tests/SentryTests/SentryOptionsTest.m b/Tests/SentryTests/SentryOptionsTest.m index 835d93179bc..93740008697 100644 --- a/Tests/SentryTests/SentryOptionsTest.m +++ b/Tests/SentryTests/SentryOptionsTest.m @@ -476,15 +476,21 @@ - (void)testIntegrations NSArray *integrations = @[ @"integration1", @"integration2" ]; SentryOptions *options = [self getValidOptions:@{ @"integrations" : integrations }]; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" [self assertArrayEquals:integrations actual:options.integrations]; +#pragma clang diagnostic pop } - (void)testDefaultIntegrations { SentryOptions *options = [self getValidOptions:@{}]; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" XCTAssertTrue([[SentryOptions defaultIntegrations] isEqualToArray:options.integrations], @"Default integrations are not set correctly"); +#pragma clang diagnostic pop } #if SENTRY_HAS_UIKIT @@ -671,8 +677,11 @@ - (void)assertDefaultValues:(SentryOptions *)options XCTAssertNil(options.beforeSend); XCTAssertNil(options.beforeBreadcrumb); XCTAssertNil(options.onCrashedLastRun); +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" XCTAssertTrue([[SentryOptions defaultIntegrations] isEqualToArray:options.integrations], @"Default integrations are not set correctly"); +#pragma clang diagnostic pop XCTAssertEqual(@1, options.sampleRate); XCTAssertEqual(YES, options.enableAutoSessionTracking); XCTAssertEqual(YES, options.enableWatchdogTerminationTracking); diff --git a/Tests/SentryTests/SentrySDKInternalTests.swift b/Tests/SentryTests/SentrySDKInternalTests.swift index a84196aa443..daba0d54841 100644 --- a/Tests/SentryTests/SentrySDKInternalTests.swift +++ b/Tests/SentryTests/SentrySDKInternalTests.swift @@ -9,6 +9,7 @@ class SentrySDKInternalTests: XCTestCase { private class Fixture { + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") let options: Options = { let options = Options.noIntegrations() options.dsn = SentrySDKInternalTests.dsnAsString @@ -90,6 +91,7 @@ class SentrySDKInternalTests: XCTestCase { fixture = Fixture() } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") override func tearDown() { super.tearDown() @@ -124,6 +126,7 @@ class SentrySDKInternalTests: XCTestCase { XCTAssertEqual(event.eventId, hub.sentFatalEvents.first?.eventId) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testCaptureEnvelope() { givenSdkWithHub() @@ -134,6 +137,7 @@ class SentrySDKInternalTests: XCTestCase { XCTAssertEqual(envelope.header.eventId, fixture.client.captureEnvelopeInvocations.first?.header.eventId) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testStoreEnvelope() { givenSdkWithHub() @@ -149,6 +153,7 @@ class SentrySDKInternalTests: XCTestCase { /// payload below simulates. The JSON stems from writing an envelope to disk with vast data /// that leads to an OOM termination on v 8.33.0. /// Running this test on v 8.33.0 leads to a crash. + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testStartSDK_WithCorruptedEnvelope() throws { let fileManager = try SentryFileManager(options: fixture.options) @@ -187,6 +192,7 @@ class SentrySDKInternalTests: XCTestCase { } } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testCaptureFeedback() { givenSdkWithHub() @@ -199,6 +205,7 @@ class SentrySDKInternalTests: XCTestCase { } } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testStartSession() { givenSdkWithHub() @@ -219,6 +226,7 @@ class SentrySDKInternalTests: XCTestCase { XCTAssertNil(actual?.duration) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testEndSession() throws { givenSdkWithHub() @@ -239,6 +247,7 @@ class SentrySDKInternalTests: XCTestCase { XCTAssertEqual(SentryDependencyContainer.sharedInstance().dateProvider.date(), actual.timestamp) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testSetUser_SetsUserToScopeOfHub() { givenSdkWithHub() @@ -271,6 +280,7 @@ class SentrySDKInternalTests: XCTestCase { XCTAssertTrue(actualLogMessage.contains(expectedLogMessage), "Expected log message to contain '\(expectedLogMessage)', but got '\(actualLogMessage)'") } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testSetUserAFterStartingSDK_DoesNotLogFatalMessage() { // Arrange let oldOutput = SentrySDKLog.getLogOutput() @@ -293,6 +303,7 @@ class SentrySDKInternalTests: XCTestCase { XCTAssertEqual(0, logOutput.loggedMessages.count, "Expected no log messages, but got \(logOutput.loggedMessages.count)") } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testStartTransaction() throws { givenSdkWithHub() @@ -307,6 +318,7 @@ class SentrySDKInternalTests: XCTestCase { XCTAssertNil(SentrySDK.span) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testStartTransaction_WithBindToScope() throws { givenSdkWithHub() @@ -322,6 +334,7 @@ class SentrySDKInternalTests: XCTestCase { XCTAssert(transaction === newSpan) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testInstallIntegrations() throws { let options = Options() options.dsn = "mine" @@ -360,6 +373,7 @@ class SentrySDKInternalTests: XCTestCase { } #endif // SENTRY_HAS_UIKIT + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testSDKStartInvocations() { XCTAssertEqual(0, SentrySDKInternal.startInvocations) @@ -371,6 +385,7 @@ class SentrySDKInternalTests: XCTestCase { XCTAssertEqual(1, SentrySDKInternal.startInvocations) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testSDKStartTimestamp() { let currentDateProvider = TestCurrentDateProvider() SentryDependencyContainer.sharedInstance().dateProvider = currentDateProvider @@ -388,6 +403,7 @@ class SentrySDKInternalTests: XCTestCase { XCTAssertNil(SentrySDKInternal.startTimestamp) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testIsEnabled() { XCTAssertFalse(SentrySDK.isEnabled) @@ -413,6 +429,7 @@ class SentrySDKInternalTests: XCTestCase { XCTAssertTrue(SentrySDK.isEnabled) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testClose_ResetsDependencyContainer() { SentrySDK.start { options in options.dsn = SentrySDKInternalTests.dsnAsString @@ -428,6 +445,7 @@ class SentrySDKInternalTests: XCTestCase { XCTAssertNotEqual(first, second) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testClose_ClearsIntegrations() { SentrySDK.start { options in options.dsn = SentrySDKInternalTests.dsnAsString @@ -471,6 +489,7 @@ class SentrySDKInternalTests: XCTestCase { #endif #if os(iOS) || os(tvOS) || targetEnvironment(macCatalyst) + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testReportFullyDisplayed() { fixture.options.enableTimeToFullDisplayTracing = true @@ -489,6 +508,7 @@ class SentrySDKInternalTests: XCTestCase { #endif #if os(iOS) + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testSentryUIDeviceWrapperStarted() { let deviceWrapper = TestSentryUIDeviceWrapper() SentryDependencyContainer.sharedInstance().uiDeviceWrapper = deviceWrapper @@ -496,6 +516,7 @@ class SentrySDKInternalTests: XCTestCase { XCTAssertTrue(deviceWrapper.started) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testSentryUIDeviceWrapperStopped() { let deviceWrapper = TestSentryUIDeviceWrapper() SentryDependencyContainer.sharedInstance().uiDeviceWrapper = deviceWrapper @@ -505,6 +526,7 @@ class SentrySDKInternalTests: XCTestCase { } /// Ensure to start the UIDeviceWrapper before initializing the hub, so enrich scope sets the correct OS version. + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testStartSDK_ScopeContextContainsOSVersion() throws { let expectation = XCTestExpectation(description: "SentrySDK start called") @@ -532,6 +554,7 @@ class SentrySDKInternalTests: XCTestCase { } #endif + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testResumeAndPauseAppHangTracking() { SentrySDK.start { options in options.dsn = SentrySDKInternalTests.dsnAsString @@ -557,6 +580,7 @@ class SentrySDKInternalTests: XCTestCase { } } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testResumeAndPauseAppHangTracking_ANRTrackingNotInstalled() { SentrySDK.start { options in options.dsn = SentrySDKInternalTests.dsnAsString @@ -571,6 +595,7 @@ class SentrySDKInternalTests: XCTestCase { SentrySDK.resumeAppHangTracking() } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testClose_SetsClientToNil() { SentrySDK.start { options in options.dsn = SentrySDKInternalTests.dsnAsString @@ -582,6 +607,7 @@ class SentrySDKInternalTests: XCTestCase { XCTAssertNil(SentrySDKInternal.currentHub().client()) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testClose_ClosesClient() { SentrySDK.start { options in options.dsn = SentrySDKInternalTests.dsnAsString @@ -594,6 +620,7 @@ class SentrySDKInternalTests: XCTestCase { XCTAssertFalse(client?.isEnabled ?? true) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testClose_CallsFlushCorrectlyOnTransport() throws { SentrySDK.start { options in options.dsn = SentrySDKInternalTests.dsnAsString @@ -609,6 +636,7 @@ class SentrySDKInternalTests: XCTestCase { XCTAssertEqual(Options().shutdownTimeInterval, transport.flushInvocations.first) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testLogger_ReturnsSameInstanceOnMultipleCalls() { givenSdkWithHub() @@ -618,6 +646,7 @@ class SentrySDKInternalTests: XCTestCase { XCTAssertIdentical(logger1, logger2) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testClose_ResetsLogger() { givenSdkWithHub() @@ -639,6 +668,7 @@ class SentrySDKInternalTests: XCTestCase { XCTAssertNotIdentical(logger1, logger2) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testLogger_WithLogsEnabled_CapturesLog() { fixture.client.options.experimental.enableLogs = true givenSdkWithHub() @@ -670,6 +700,7 @@ class SentrySDKInternalTests: XCTestCase { XCTAssertEqual(fixture.client.captureLogsDataInvocations.count, 0) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testLogger_WithLogsDisabled_DoesNotCaptureLog() { fixture.client.options.experimental.enableLogs = false givenSdkWithHub() @@ -678,6 +709,7 @@ class SentrySDKInternalTests: XCTestCase { XCTAssertEqual(fixture.client.captureLogsDataInvocations.count, 0) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testFlush_CallsFlushCorrectlyOnTransport() throws { SentrySDK.start { options in options.dsn = SentrySDKInternalTests.dsnAsString @@ -695,6 +727,7 @@ class SentrySDKInternalTests: XCTestCase { XCTAssertEqual(flushTimeout, transport.flushInvocations.first) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testStartOnTheMainThread() throws { let expectation = XCTestExpectation(description: "SentrySDK start called") @@ -787,6 +820,7 @@ class SentrySDKInternalTests: XCTestCase { XCTAssertEqual(result.count, 3) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testStartWithOptions_shouldMoveCurrentContextFileToPreviousFile() throws { // -- Arrange -- fixture.observer.setContext([ @@ -817,6 +851,7 @@ class SentrySDKInternalTests: XCTestCase { XCTAssertEqual(value["b"], "c") } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testStartWithOptions_shouldMoveCurrentUserFileToPreviousFile() throws { // -- Arrange -- fixture.observer.setUser(User(userId: "user1234")) @@ -843,6 +878,7 @@ class SentrySDKInternalTests: XCTestCase { XCTAssertEqual(result.userId, "user1234") } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testStartWithOptions_shouldMoveCurrentDistFileToPreviousFile() throws { // -- Arrange -- fixture.observer.setDist("dist-string") @@ -868,6 +904,7 @@ class SentrySDKInternalTests: XCTestCase { XCTAssertEqual(result, "dist-string") } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testStartWithOptions_shouldMoveCurrentEnvironmentFileToPreviousFile() throws { // -- Arrange -- fixture.observer.setEnvironment("prod-string") @@ -893,6 +930,7 @@ class SentrySDKInternalTests: XCTestCase { XCTAssertEqual(result, "prod-string") } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testStartWithOptions_shouldMoveCurrentExtraFileToPreviousFile() throws { // -- Arrange -- fixture.observer.setExtras(["extra1": "value1", "extra2": "value2"]) @@ -921,6 +959,7 @@ class SentrySDKInternalTests: XCTestCase { XCTAssertEqual(result["extra2"] as? String, "value2") } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testStartWithOptions_shouldMoveCurrentFingerprintFileToPreviousFile() throws { // -- Arrange -- fixture.observer.setFingerprint(["fingerprint1", "fingerprint2"]) @@ -949,6 +988,7 @@ class SentrySDKInternalTests: XCTestCase { XCTAssertEqual(result[1], "fingerprint2") } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testStartWithOptions_shouldMoveCurrentTagsFileToPreviousFile() throws { // -- Arrange -- fixture.observer.setTags(["tag1": "value1", "tag2": "value2"]) @@ -979,6 +1019,7 @@ class SentrySDKInternalTests: XCTestCase { #endif // os(iOS) || os(tvOS) || targetEnvironment(macCatalyst) #if os(macOS) + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testCaptureCrashOnException() { givenSdkWithHub() @@ -995,11 +1036,14 @@ class SentrySDKInternalTests: XCTestCase { } private extension SentrySDKInternalTests { + + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func givenSdkWithHub() { SentrySDKInternal.setCurrentHub(fixture.hub) SentrySDKInternal.setStart(with: fixture.options) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func givenSdkWithHubButNoClient() { SentrySDKInternal.setCurrentHub(SentryHub(client: nil, andScope: nil)) SentrySDKInternal.setStart(with: fixture.options) diff --git a/Tests/SentryTests/SentrySDKTests.swift b/Tests/SentryTests/SentrySDKTests.swift index aa5b58b46e5..ac42cc755fa 100644 --- a/Tests/SentryTests/SentrySDKTests.swift +++ b/Tests/SentryTests/SentrySDKTests.swift @@ -8,6 +8,7 @@ class SentrySDKTests: XCTestCase { private class Fixture { + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") let options: Options = { let options = Options.noIntegrations() options.dsn = SentrySDKTests.dsnAsString @@ -89,6 +90,7 @@ class SentrySDKTests: XCTestCase { fixture = Fixture() } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") override func tearDown() { super.tearDown() @@ -104,6 +106,7 @@ class SentrySDKTests: XCTestCase { } // Repro for: https://github.com/getsentry/sentry-cocoa/issues/1325 + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testStartWithZeroMaxBreadcrumbsOptionsDoesNotCrash() { SentrySDK.start { options in options.dsn = SentrySDKTests.dsnAsString @@ -149,6 +152,7 @@ class SentrySDKTests: XCTestCase { assertIntegrationsInstalled(integrations: expectedIntegrations) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testStartStopBinaryImageCache() { SentrySDK.start { options in options.debug = true @@ -163,6 +167,7 @@ class SentrySDKTests: XCTestCase { XCTAssertNil(SentryDependencyContainer.sharedInstance().binaryImageCache.cache) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testStartWithConfigureOptions_NoDsn() throws { SentrySDK.start { options in options.debug = true @@ -176,6 +181,7 @@ class SentrySDKTests: XCTestCase { XCTAssertEqual(true, options?.debug) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testStartWithConfigureOptions_WrongDsn() throws { SentrySDK.start { options in options.dsn = "wrong" @@ -188,6 +194,7 @@ class SentrySDKTests: XCTestCase { XCTAssertNil(options?.parsedDsn) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testStartWithConfigureOptions_BeforeSend() { var wasBeforeSendCalled = false SentrySDK.start { options in @@ -204,6 +211,7 @@ class SentrySDKTests: XCTestCase { XCTAssertTrue(wasBeforeSendCalled, "beforeSend was not called.") } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testStartWithScope() { let scope = Scope() scope.setUser(User(userId: "me")) @@ -238,6 +246,7 @@ class SentrySDKTests: XCTestCase { XCTAssertFalse(SentrySDK.detectedStartUpCrash) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testInstallIntegrations_NoIntegrations() { SentrySDK.start { options in options.removeAllIntegrations() @@ -246,11 +255,13 @@ class SentrySDKTests: XCTestCase { assertIntegrationsInstalled(integrations: []) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testGlobalOptions() { SentrySDK.start(options: fixture.options) XCTAssertEqual(SentrySDKInternal.options, fixture.options) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testGlobalOptionsForPreview() { startprocessInfoWrapperForPreview() @@ -258,6 +269,7 @@ class SentrySDKTests: XCTestCase { XCTAssertEqual(SentrySDKInternal.options, fixture.options) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testCaptureEvent() { givenSdkWithHub() @@ -266,6 +278,7 @@ class SentrySDKTests: XCTestCase { assertEventCaptured(expectedScope: fixture.scope) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testCaptureEventWithScope() { givenSdkWithHub() @@ -275,6 +288,7 @@ class SentrySDKTests: XCTestCase { assertEventCaptured(expectedScope: scope) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testCaptureEventWithScopeBlock_ScopePassedToHub() { givenSdkWithHub() @@ -283,6 +297,7 @@ class SentrySDKTests: XCTestCase { assertEventCaptured(expectedScope: fixture.scopeWithBlockApplied) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testCaptureEventWithScopeBlock_CreatesNewScope() { givenSdkWithHub() @@ -291,6 +306,7 @@ class SentrySDKTests: XCTestCase { assertHubScopeNotChanged() } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testCaptureError() { givenSdkWithHub() @@ -299,6 +315,7 @@ class SentrySDKTests: XCTestCase { assertErrorCaptured(expectedScope: fixture.scope) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testCaptureErrorWithScope() { givenSdkWithHub() @@ -308,6 +325,7 @@ class SentrySDKTests: XCTestCase { assertErrorCaptured(expectedScope: scope) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testCaptureErrorWithScopeBlock_ScopePassedToHub() { givenSdkWithHub() @@ -316,6 +334,7 @@ class SentrySDKTests: XCTestCase { assertErrorCaptured(expectedScope: fixture.scopeWithBlockApplied) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testCaptureErrorWithScopeBlock_CreatesNewScope() { givenSdkWithHub() @@ -324,6 +343,7 @@ class SentrySDKTests: XCTestCase { assertHubScopeNotChanged() } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testCaptureException() { givenSdkWithHub() @@ -332,6 +352,7 @@ class SentrySDKTests: XCTestCase { assertExceptionCaptured(expectedScope: fixture.scope) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testCaptureExceptionWithScope() { givenSdkWithHub() @@ -341,6 +362,7 @@ class SentrySDKTests: XCTestCase { assertExceptionCaptured(expectedScope: scope) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testCaptureExceptionWithScopeBlock_ScopePassedToHub() { givenSdkWithHub() @@ -349,6 +371,7 @@ class SentrySDKTests: XCTestCase { assertExceptionCaptured(expectedScope: fixture.scopeWithBlockApplied) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testCaptureExceptionWithScopeBlock_CreatesNewScope() { givenSdkWithHub() @@ -357,6 +380,7 @@ class SentrySDKTests: XCTestCase { assertHubScopeNotChanged() } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testCaptureMessageWithScopeBlock_ScopePassedToHub() { givenSdkWithHub() @@ -365,6 +389,7 @@ class SentrySDKTests: XCTestCase { assertMessageCaptured(expectedScope: fixture.scopeWithBlockApplied) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") func testCaptureMessageWithScopeBlock_CreatesNewScope() { givenSdkWithHub() @@ -425,11 +450,13 @@ extension SentrySDKTests { } } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") private func givenSdkWithHubButNoClient() { SentrySDKInternal.setCurrentHub(SentryHub(client: nil, andScope: nil)) SentrySDKInternal.setStart(with: fixture.options) } + @available(*, deprecated, message: "This is deprecated because SentryOptions integrations is deprecated") private func givenSdkWithHub() { SentrySDKInternal.setCurrentHub(fixture.hub) SentrySDKInternal.setStart(with: fixture.options) diff --git a/sdk_api.json b/sdk_api.json index 479710a83d0..29ef87f82ac 100644 --- a/sdk_api.json +++ b/sdk_api.json @@ -16303,9 +16303,11 @@ "declKind": "Var", "usr": "c:objc(cs)SentryOptions(py)integrations", "moduleName": "Sentry", + "deprecated": true, "isOpen": true, "objc_name": "integrations", "declAttributes": [ + "Available", "ObjC", "Dynamic" ], @@ -16341,10 +16343,12 @@ "declKind": "Accessor", "usr": "c:objc(cs)SentryOptions(im)integrations", "moduleName": "Sentry", + "deprecated": true, "isOpen": true, "objc_name": "integrations", "declAttributes": [ "DiscardableResult", + "Available", "ObjC", "Dynamic" ], @@ -16393,9 +16397,11 @@ "declKind": "Accessor", "usr": "c:objc(cs)SentryOptions(im)setIntegrations:", "moduleName": "Sentry", + "deprecated": true, "isOpen": true, "objc_name": "setIntegrations:", "declAttributes": [ + "Available", "ObjC", "Dynamic" ], diff --git a/sdk_api_V9.json b/sdk_api_V9.json index 507529388f3..7d15f37493a 100644 --- a/sdk_api_V9.json +++ b/sdk_api_V9.json @@ -15845,137 +15845,6 @@ } ] }, - { - "kind": "Var", - "name": "integrations", - "printedName": "integrations", - "children": [ - { - "kind": "TypeNominal", - "name": "Optional", - "printedName": "[Swift.String]?", - "children": [ - { - "kind": "TypeNominal", - "name": "Array", - "printedName": "[Swift.String]", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "usr": "s:Sa" - } - ], - "usr": "s:Sq" - } - ], - "declKind": "Var", - "usr": "c:objc(cs)SentryOptions(py)integrations", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "integrations", - "declAttributes": [ - "ObjC", - "Dynamic" - ], - "accessors": [ - { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ - { - "kind": "TypeNominal", - "name": "Optional", - "printedName": "[Swift.String]?", - "children": [ - { - "kind": "TypeNominal", - "name": "Array", - "printedName": "[Swift.String]", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "usr": "s:Sa" - } - ], - "usr": "s:Sq" - } - ], - "declKind": "Accessor", - "usr": "c:objc(cs)SentryOptions(im)integrations", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "integrations", - "declAttributes": [ - "DiscardableResult", - "ObjC", - "Dynamic" - ], - "accessorKind": "get" - }, - { - "kind": "Accessor", - "name": "Set", - "printedName": "Set()", - "children": [ - { - "kind": "TypeNameAlias", - "name": "Void", - "printedName": "Swift.Void", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - } - ] - }, - { - "kind": "TypeNominal", - "name": "Optional", - "printedName": "[Swift.String]?", - "children": [ - { - "kind": "TypeNominal", - "name": "Array", - "printedName": "[Swift.String]", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "usr": "s:Sa" - } - ], - "usr": "s:Sq" - } - ], - "declKind": "Accessor", - "usr": "c:objc(cs)SentryOptions(im)setIntegrations:", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "setIntegrations:", - "declAttributes": [ - "ObjC", - "Dynamic" - ], - "accessorKind": "set" - } - ] - }, { "kind": "Function", "name": "defaultIntegrations",