From e6741e0550c1deab5ad6305b57450976f883789e Mon Sep 17 00:00:00 2001 From: Noah Martin Date: Fri, 31 Oct 2025 16:09:15 -0400 Subject: [PATCH 1/2] ref: SentryClient and SentryHub in Swift --- .../iOS-Swift/Tools/SentryExposure.h | 16 +- Sentry.xcodeproj/project.pbxproj | 52 +- SentryTestUtils/SentryHub+Test.h | 5 +- SentryTestUtils/TestClient.swift | 2 +- SentryTestUtils/TestHub.swift | 2 +- Sources/Resources/Sentry.modulemap | 2 +- .../Sentry/Profiling/SentryLaunchProfiling.m | 2 +- .../SentryProfiledTracerConcurrency.mm | 24 +- .../SentryProfilerSerialization+Test.h | 4 +- .../Profiling/SentryProfilerSerialization.m | 9 +- .../Profiling/SentryProfilingSwiftHelpers.m | 7 +- Sources/Sentry/Public/Sentry.h | 3 +- Sources/Sentry/Public/SentryId.h | 48 + Sources/Sentry/Public/SentryWithoutUIKit.h | 3 +- Sources/Sentry/SentryClient.m | 7 +- .../SentryDependencyContainerSwiftHelper.m | 11 +- Sources/Sentry/SentryEnvelopeHeaderHelper.m | 12 - Sources/Sentry/SentryHub.m | 48 +- Sources/Sentry/SentryId.m | 95 + Sources/Sentry/SentryOptions.m | 4 +- Sources/Sentry/SentryProfiler.mm | 2 +- Sources/Sentry/SentryReplayApi.m | 1 + Sources/Sentry/SentrySDKInternal.m | 89 +- Sources/Sentry/SentryScreenshotIntegration.m | 6 +- Sources/Sentry/SentryTracer.m | 4 +- .../Sentry/SentryViewHierarchyIntegration.m | 4 +- ...OptionsInternal.m => SentyOptionsHelper.m} | 10 +- ...tionsInternal.h => SentryOptionsHelpers.h} | 2 +- Sources/Sentry/include/SentryClient+Logs.h | 2 +- Sources/Sentry/include/SentryClient+Private.h | 2 +- .../Sentry/{Public => include}/SentryClient.h | 4 +- .../SentryDependencyContainerSwiftHelper.h | 3 +- .../include/SentryEnvelopeHeaderHelper.h | 18 - Sources/Sentry/include/SentryHub+Private.h | 4 +- .../Sentry/{Public => include}/SentryHub.h | 10 +- .../Sentry/include/SentryLaunchProfiling.h | 4 +- Sources/Sentry/include/SentryPrivate.h | 2 +- .../include/SentryProfiledTracerConcurrency.h | 12 +- .../Sentry/include/SentryProfiler+Private.h | 4 +- .../include/SentryProfilerSerialization.h | 6 +- .../include/SentryProfilingSwiftHelpers.h | 8 +- Sources/Sentry/include/SentrySDK+Private.h | 4 +- Sources/Sentry/include/SentrySDKInternal.h | 50 +- Sources/Sentry/include/SentryTracer+Private.h | 2 +- Sources/Sentry/include/SentryTracer.h | 6 +- Sources/Sentry/include/SentryUserAccess.h | 1 - .../SentryInternal/SentryInternal.h | 4 +- Sources/Swift/Core/Protocol/SentryId.swift | 77 - Sources/Swift/Helper/SentrySDK.swift | 32 +- .../Integrations/Session/SessionTracker.swift | 8 +- Sources/Swift/SentryClient.swift | 138 + .../SentryCrash/SentryThreadInspector.swift | 4 + Sources/Swift/SentryHub.swift | 293 + Sources/Swift/Tools/SentryEnvelope.swift | 3 +- Sources/Swift/Tools/SentryLogBatcher.swift | 26 +- Sources/Swift/Tools/SentryLogger.swift | 4 +- .../DuplicatedSDKTest-Bridging-Header.h | 2 +- .../SentryProfileTestFixture.swift | 4 +- .../SentryProfilerTests.mm | 2 +- .../SentryProfilingPublicAPITests.swift | 4 +- .../SentryProfilingSwiftHelpersTests.m | 9 +- .../SentryTests-Bridging-Header.h | 1 + .../SentryTraceViewModelTest.swift | 10 +- ...toBreadcrumbTrackingIntegrationTests.swift | 2 +- .../Feedback/SentryFeedbackTests.swift | 6 +- ...SentryFileIOTrackerSwiftHelpersTests.swift | 4 +- .../SentryTimeToDisplayTrackerTest.swift | 2 +- .../SentryCrashIntegrationTests.swift | 22 +- .../Session/SentrySessionGeneratorTests.swift | 2 +- .../Session/SentrySessionTrackerTests.swift | 2 +- .../SentrySessionReplayIntegrationTests.swift | 8 +- .../UIEvents/SentryUIEventTrackerTests.swift | 2 +- ...entryWatchdogTerminationTrackerTests.swift | 2 +- ...gTerminationTrackingIntegrationTests.swift | 4 +- Tests/SentryTests/Networking/SentryDsnTests.m | 18 +- .../SentryTransportInitializerTests.swift | 2 +- .../Protocol/SentrySDKSettingsTests.swift | 4 +- Tests/SentryTests/SentryClient+TestInit.h | 2 +- Tests/SentryTests/SentryClientTests.swift | 36 +- ...SentryCrashInstallationReporterTests.swift | 2 +- Tests/SentryTests/SentryHubTests.swift | 42 +- Tests/SentryTests/SentryInterfacesTests.m | 1 + Tests/SentryTests/SentryOptionsTest.m | 28 +- .../SentrySDKIntegrationTestsBase.swift | 2 +- Tests/SentryTests/SentrySDKInternal+Tests.h | 2 +- .../SentryTests/SentrySDKInternalTests.swift | 14 +- Tests/SentryTests/SentrySDKTests.swift | 6 +- Tests/SentryTests/SentrySDKThreadTests.swift | 4 +- .../SentryTests/SentryTests-Bridging-Header.h | 2 +- Tests/SentryTests/SentryTests.m | 6 +- .../Transaction/SentrySpanTests.swift | 4 +- .../Transaction/SentryTransactionTests.swift | 2 +- sdk_api.json | 6951 ++++++++--------- 93 files changed, 4299 insertions(+), 4122 deletions(-) create mode 100644 Sources/Sentry/Public/SentryId.h delete mode 100644 Sources/Sentry/SentryEnvelopeHeaderHelper.m create mode 100644 Sources/Sentry/SentryId.m rename Sources/Sentry/{SentyOptionsInternal.m => SentyOptionsHelper.m} (98%) rename Sources/Sentry/include/HybridPublic/{SentryOptionsInternal.h => SentryOptionsHelpers.h} (89%) rename Sources/Sentry/{Public => include}/SentryClient.h (99%) delete mode 100644 Sources/Sentry/include/SentryEnvelopeHeaderHelper.h rename Sources/Sentry/{Public => include}/SentryHub.h (97%) delete mode 100644 Sources/Swift/Core/Protocol/SentryId.swift create mode 100644 Sources/Swift/SentryClient.swift create mode 100644 Sources/Swift/SentryHub.swift diff --git a/Samples/iOS-Swift/iOS-Swift/Tools/SentryExposure.h b/Samples/iOS-Swift/iOS-Swift/Tools/SentryExposure.h index 7e45326168f..7712f4be68e 100644 --- a/Samples/iOS-Swift/iOS-Swift/Tools/SentryExposure.h +++ b/Samples/iOS-Swift/iOS-Swift/Tools/SentryExposure.h @@ -2,7 +2,7 @@ #import #import -@class SentryHub; +@class SentryOptions; NS_ASSUME_NONNULL_BEGIN @@ -13,11 +13,23 @@ NS_ASSUME_NONNULL_BEGIN @end +@interface SentryClientInternal : NSObject + +@property (nonatomic) SentryOptions *options; + +@end + +@interface SentryHubInternal : NSObject + +- (nullable SentryClientInternal *)getClient; + +@end + @interface SentrySDKInternal : NSObject + (nullable NSArray *)relevantViewControllersNames; -+ (SentryHub *)currentHub; ++ (SentryHubInternal *)currentHub; @end diff --git a/Sentry.xcodeproj/project.pbxproj b/Sentry.xcodeproj/project.pbxproj index 361b3798205..9840480fcae 100644 --- a/Sentry.xcodeproj/project.pbxproj +++ b/Sentry.xcodeproj/project.pbxproj @@ -198,7 +198,7 @@ 63AA766A1EB8CB2F00D153DE /* Sentry.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63AA759B1EB8AEF500D153DE /* Sentry.framework */; settings = {ATTRIBUTES = (Required, ); }; }; 63AA76701EB8CB4B00D153DE /* SentryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 63AA75951EB8AEDB00D153DE /* SentryTests.m */; }; 63AA767A1EB8D20500D153DE /* SentryLogC.m in Sources */ = {isa = PBXBuildFile; fileRef = 63AA76781EB8D20500D153DE /* SentryLogC.m */; }; - 63AA76981EB9C1C200D153DE /* SentryClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 63AA76941EB9C1C200D153DE /* SentryClient.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 63AA76981EB9C1C200D153DE /* SentryClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 63AA76941EB9C1C200D153DE /* SentryClient.h */; }; 63AA76991EB9C1C200D153DE /* SentryDefines.h in Headers */ = {isa = PBXBuildFile; fileRef = 63AA76951EB9C1C200D153DE /* SentryDefines.h */; settings = {ATTRIBUTES = (Public, ); }; }; 63AA769D1EB9C57A00D153DE /* SentryError.h in Headers */ = {isa = PBXBuildFile; fileRef = 63AA769B1EB9C57A00D153DE /* SentryError.h */; settings = {ATTRIBUTES = (Public, ); }; }; 63AA769E1EB9C57A00D153DE /* SentryError.mm in Sources */ = {isa = PBXBuildFile; fileRef = 63AA769C1EB9C57A00D153DE /* SentryError.mm */; }; @@ -358,7 +358,7 @@ 7B26BBFB24C0A66D00A79CCC /* SentrySdkInfoNilTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 7B26BBFA24C0A66D00A79CCC /* SentrySdkInfoNilTests.m */; }; 7B2A70D827D5F080008B0D15 /* SentryANRTrackerV1Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B2A70D727D5F07F008B0D15 /* SentryANRTrackerV1Tests.swift */; }; 7B2A70DF27D60904008B0D15 /* SentryTestThreadWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B2A70DE27D60904008B0D15 /* SentryTestThreadWrapper.swift */; }; - 7B2BB0032966F55900A1E102 /* SentryOptionsInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B2BB0012966F55900A1E102 /* SentryOptionsInternal.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 7B2BB0032966F55900A1E102 /* SentryOptionsHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B2BB0012966F55900A1E102 /* SentryOptionsHelpers.h */; settings = {ATTRIBUTES = (Private, ); }; }; 7B30B68026527C3C006B2752 /* SentryFramesTrackerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B30B67F26527C3C006B2752 /* SentryFramesTrackerTests.swift */; }; 7B31C291277B04A000337126 /* SentryCrashPlatformSpecificDefines.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B31C290277B04A000337126 /* SentryCrashPlatformSpecificDefines.h */; }; 7B3398632459C14000BD9C96 /* SentryEnvelopeRateLimit.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B3398622459C14000BD9C96 /* SentryEnvelopeRateLimit.h */; }; @@ -555,7 +555,7 @@ 7BFE7A0A27A1B6B000D2B66E /* SentryWatchdogTerminationTrackingIntegrationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BFE7A0927A1B6B000D2B66E /* SentryWatchdogTerminationTrackingIntegrationTests.swift */; }; 7D0637032382B34300B30749 /* SentryScope.h in Headers */ = {isa = PBXBuildFile; fileRef = 7D0637022382B34300B30749 /* SentryScope.h */; settings = {ATTRIBUTES = (Public, ); }; }; 7D082B8323C628790029866B /* SentryMeta.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D082B8023C628780029866B /* SentryMeta.m */; }; - 7D0FCFB22379B915004DD83A /* SentryHub.h in Headers */ = {isa = PBXBuildFile; fileRef = 7D0FCFB02379B915004DD83A /* SentryHub.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7D0FCFB22379B915004DD83A /* SentryHub.h in Headers */ = {isa = PBXBuildFile; fileRef = 7D0FCFB02379B915004DD83A /* SentryHub.h */; }; 7D5C441C237C2E1F00DAB0A3 /* SentryHub.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D5C4419237C2E1F00DAB0A3 /* SentryHub.m */; }; 7D65260E237F649E00113EA2 /* SentryScope.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D65260B237F649E00113EA2 /* SentryScope.m */; }; 7D9B07A023D1E89900C5FC8E /* SentryMeta.h in Headers */ = {isa = PBXBuildFile; fileRef = 7D9B079F23D1E89800C5FC8E /* SentryMeta.h */; }; @@ -1038,6 +1038,8 @@ FA21A2EF2E60E9CB00E7EADB /* EnvelopeComparison.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA21A2E92E60E9C700E7EADB /* EnvelopeComparison.swift */; }; FA21F0B42E4A2A80008B4E5A /* SentryAppState.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA4C32972DF7513F001D7B01 /* SentryAppState.swift */; }; FA27EBF52EB82FAD00F2ECF7 /* FileIOTrackerTestHelpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA27EBEF2EB82FA800F2ECF7 /* FileIOTrackerTestHelpers.swift */; }; + FA27EBDC2EB639D400F2ECF7 /* SentryId.h in Headers */ = {isa = PBXBuildFile; fileRef = FA27EBDB2EB639D100F2ECF7 /* SentryId.h */; settings = {ATTRIBUTES = (Public, ); }; }; + FA27EBDE2EB639D900F2ECF7 /* SentryId.m in Sources */ = {isa = PBXBuildFile; fileRef = FA27EBDD2EB639D700F2ECF7 /* SentryId.m */; }; FA34C1A32E692A5000BC52AA /* SentryEnvelopeItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA34C1A22E692A5000BC52AA /* SentryEnvelopeItem.swift */; }; FA3734842E0F086C0091EF24 /* SentryDependencyContainerSwiftHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = FA3734832E0F07A20091EF24 /* SentryDependencyContainerSwiftHelper.h */; }; FA3734862E0F09320091EF24 /* SentryDependencyContainerSwiftHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = FA3734852E0F092F0091EF24 /* SentryDependencyContainerSwiftHelper.m */; }; @@ -1046,6 +1048,8 @@ FA458CC32E691A730061B13D /* SentryProcessInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA458CBD2E691A6E0061B13D /* SentryProcessInfo.swift */; }; FA4C32972DF7513F001D7B00 /* SentryExperimentalOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA4C32962DF7513F001D7B00 /* SentryExperimentalOptions.swift */; }; FA560F602E8C877200F2AF7F /* SentryAppStateManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA560F5A2E8C876A00F2AF7F /* SentryAppStateManager.swift */; }; + FA6252042EB52DD900BFC967 /* SentryHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA6251FE2EB52DD700BFC967 /* SentryHub.swift */; }; + FA6252062EB5489E00BFC967 /* SentryClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA6252052EB5489B00BFC967 /* SentryClient.swift */; }; FA6555142E30181B009917BC /* SentrySDKInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = FA6555132E30181B009917BC /* SentrySDKInternal.h */; }; FA6555162E30182B009917BC /* SentrySDKInternal.m in Sources */ = {isa = PBXBuildFile; fileRef = FA6555152E30182B009917BC /* SentrySDKInternal.m */; }; FA65551A2E3018A3009917BC /* SentrySDKTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA6555192E30189E009917BC /* SentrySDKTests.swift */; }; @@ -1058,7 +1062,6 @@ FA67DCF82DDBD4EA00896B02 /* SentryProfileOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA67DCD32DDBD4EA00896B02 /* SentryProfileOptions.swift */; }; FA67DCF92DDBD4EA00896B02 /* HTTPHeaderSanitizer.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA67DCEA2DDBD4EA00896B02 /* HTTPHeaderSanitizer.swift */; }; FA67DCFA2DDBD4EA00896B02 /* SentryViewRendererV2.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA67DCE62DDBD4EA00896B02 /* SentryViewRendererV2.swift */; }; - FA67DCFB2DDBD4EA00896B02 /* SentryId.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA67DCDB2DDBD4EA00896B02 /* SentryId.swift */; }; FA67DCFC2DDBD4EA00896B02 /* SentryFramesDelayResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA67DCD12DDBD4EA00896B02 /* SentryFramesDelayResult.swift */; }; FA67DCFD2DDBD4EA00896B02 /* SentryANRTracker.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA67DCCD2DDBD4EA00896B02 /* SentryANRTracker.swift */; }; FA67DCFE2DDBD4EA00896B02 /* SentryANRTrackerV2Delegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA67DCCE2DDBD4EA00896B02 /* SentryANRTrackerV2Delegate.swift */; }; @@ -1128,7 +1131,7 @@ FABE8E172E307A7F0040809A /* Dependencies.swift in Sources */ = {isa = PBXBuildFile; fileRef = FABE8E162E307A7C0040809A /* Dependencies.swift */; }; FAC62B652E15A4100003909D /* SentrySDKThreadTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAC62B642E15A40C0003909D /* SentrySDKThreadTests.swift */; }; FAC735232E25AA81006C5A64 /* SentryProfilingSwiftHelpersTests.m in Sources */ = {isa = PBXBuildFile; fileRef = FAC735222E25AA7A006C5A64 /* SentryProfilingSwiftHelpersTests.m */; }; - FACEED132E3179A10007B4AC /* SentyOptionsInternal.m in Sources */ = {isa = PBXBuildFile; fileRef = FACEED122E3179A10007B4AC /* SentyOptionsInternal.m */; }; + FACEED132E3179A10007B4AC /* SentyOptionsHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = FACEED122E3179A10007B4AC /* SentyOptionsHelper.m */; }; FAE2DAB82E1F317900262307 /* SentryProfilingSwiftHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = FAE2DAB72E1F317900262307 /* SentryProfilingSwiftHelpers.m */; }; FAE2DABA2E1F318900262307 /* SentryProfilingSwiftHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = FAE2DAB92E1F318900262307 /* SentryProfilingSwiftHelpers.h */; }; FAE579842E7CF21800B710F9 /* SentryMigrateSessionInit.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAE5797E2E7CF21300B710F9 /* SentryMigrateSessionInit.swift */; }; @@ -1144,8 +1147,6 @@ FAEEC0522E75E55F00E79CA9 /* SentrySerializationSwift.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAEEC04C2E75E55A00E79CA9 /* SentrySerializationSwift.swift */; }; FAEFA12F2E4FAE1900C431D9 /* SentrySDKSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAEFA1292E4FAE1700C431D9 /* SentrySDKSettings.swift */; }; FAF0F3D02EA7DD0D00E44E9B /* SentryANRTrackerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAF0F3CA2EA7DD0700E44E9B /* SentryANRTrackerTests.swift */; }; - FAF120182E70C08F006E1DA3 /* SentryEnvelopeHeaderHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF120122E70C088006E1DA3 /* SentryEnvelopeHeaderHelper.h */; }; - FAF1201A2E70C0EE006E1DA3 /* SentryEnvelopeHeaderHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = FAF120192E70C0EA006E1DA3 /* SentryEnvelopeHeaderHelper.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -1487,7 +1488,7 @@ 63AA76651EB8CB2F00D153DE /* SentryTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SentryTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 63AA76781EB8D20500D153DE /* SentryLogC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SentryLogC.m; sourceTree = ""; }; 63AA76931EB9C1C200D153DE /* Sentry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Sentry.h; path = Public/Sentry.h; sourceTree = ""; }; - 63AA76941EB9C1C200D153DE /* SentryClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentryClient.h; path = Public/SentryClient.h; sourceTree = ""; }; + 63AA76941EB9C1C200D153DE /* SentryClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentryClient.h; path = include/SentryClient.h; sourceTree = ""; }; 63AA76951EB9C1C200D153DE /* SentryDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentryDefines.h; path = Public/SentryDefines.h; sourceTree = ""; }; 63AA769B1EB9C57A00D153DE /* SentryError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentryError.h; path = Public/SentryError.h; sourceTree = ""; }; 63AA769C1EB9C57A00D153DE /* SentryError.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SentryError.mm; sourceTree = ""; }; @@ -1651,7 +1652,7 @@ 7B26BBFA24C0A66D00A79CCC /* SentrySdkInfoNilTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentrySdkInfoNilTests.m; sourceTree = ""; }; 7B2A70D727D5F07F008B0D15 /* SentryANRTrackerV1Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryANRTrackerV1Tests.swift; sourceTree = ""; }; 7B2A70DE27D60904008B0D15 /* SentryTestThreadWrapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryTestThreadWrapper.swift; sourceTree = ""; }; - 7B2BB0012966F55900A1E102 /* SentryOptionsInternal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryOptionsInternal.h; path = include/HybridPublic/SentryOptionsInternal.h; sourceTree = ""; }; + 7B2BB0012966F55900A1E102 /* SentryOptionsHelpers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryOptionsHelpers.h; path = include/HybridPublic/SentryOptionsHelpers.h; sourceTree = ""; }; 7B30B67F26527C3C006B2752 /* SentryFramesTrackerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryFramesTrackerTests.swift; sourceTree = ""; }; 7B30B68126527C55006B2752 /* TestDisplayLinkWrapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestDisplayLinkWrapper.swift; sourceTree = ""; }; 7B31C290277B04A000337126 /* SentryCrashPlatformSpecificDefines.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SentryCrashPlatformSpecificDefines.h; sourceTree = ""; }; @@ -1877,7 +1878,7 @@ 7BFE7A0927A1B6B000D2B66E /* SentryWatchdogTerminationTrackingIntegrationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryWatchdogTerminationTrackingIntegrationTests.swift; sourceTree = ""; }; 7D0637022382B34300B30749 /* SentryScope.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentryScope.h; path = Public/SentryScope.h; sourceTree = ""; }; 7D082B8023C628780029866B /* SentryMeta.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryMeta.m; sourceTree = ""; }; - 7D0FCFB02379B915004DD83A /* SentryHub.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryHub.h; path = Public/SentryHub.h; sourceTree = ""; }; + 7D0FCFB02379B915004DD83A /* SentryHub.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryHub.h; path = include/SentryHub.h; sourceTree = ""; }; 7D5C4419237C2E1F00DAB0A3 /* SentryHub.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SentryHub.m; sourceTree = ""; }; 7D65260B237F649E00113EA2 /* SentryScope.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryScope.m; sourceTree = ""; }; 7D826E3E2390840E00EED93D /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; @@ -2417,6 +2418,8 @@ FA18417D2E4B457B005DEDC7 /* SentryApplication.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryApplication.swift; sourceTree = ""; }; FA21A2E92E60E9C700E7EADB /* EnvelopeComparison.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnvelopeComparison.swift; sourceTree = ""; }; FA27EBEF2EB82FA800F2ECF7 /* FileIOTrackerTestHelpers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileIOTrackerTestHelpers.swift; sourceTree = ""; }; + FA27EBDB2EB639D100F2ECF7 /* SentryId.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryId.h; path = Public/SentryId.h; sourceTree = ""; }; + FA27EBDD2EB639D700F2ECF7 /* SentryId.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryId.m; sourceTree = ""; }; FA34C1A22E692A5000BC52AA /* SentryEnvelopeItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryEnvelopeItem.swift; sourceTree = ""; }; FA3734832E0F07A20091EF24 /* SentryDependencyContainerSwiftHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryDependencyContainerSwiftHelper.h; path = include/SentryDependencyContainerSwiftHelper.h; sourceTree = ""; }; FA3734852E0F092F0091EF24 /* SentryDependencyContainerSwiftHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryDependencyContainerSwiftHelper.m; sourceTree = ""; }; @@ -2426,6 +2429,8 @@ FA4C32962DF7513F001D7B00 /* SentryExperimentalOptions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryExperimentalOptions.swift; sourceTree = ""; }; FA4C32972DF7513F001D7B01 /* SentryAppState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryAppState.swift; sourceTree = ""; }; FA560F5A2E8C876A00F2AF7F /* SentryAppStateManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryAppStateManager.swift; sourceTree = ""; }; + FA6251FE2EB52DD700BFC967 /* SentryHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryHub.swift; sourceTree = ""; }; + FA6252052EB5489B00BFC967 /* SentryClient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryClient.swift; sourceTree = ""; }; FA6555132E30181B009917BC /* SentrySDKInternal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentrySDKInternal.h; path = include/SentrySDKInternal.h; sourceTree = ""; }; FA6555152E30182B009917BC /* SentrySDKInternal.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentrySDKInternal.m; sourceTree = ""; }; FA6555192E30189E009917BC /* SentrySDKTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentrySDKTests.swift; sourceTree = ""; }; @@ -2450,7 +2455,6 @@ FA67DCD52DDBD4EA00896B02 /* SwizzleClassNameExclude.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwizzleClassNameExclude.swift; sourceTree = ""; }; FA67DCD82DDBD4EA00896B02 /* SentryMXCallStackTree.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryMXCallStackTree.swift; sourceTree = ""; }; FA67DCD92DDBD4EA00896B02 /* SentryMXManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryMXManager.swift; sourceTree = ""; }; - FA67DCDB2DDBD4EA00896B02 /* SentryId.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryId.swift; sourceTree = ""; }; FA67DCDC2DDBD4EA00896B02 /* SentryRedactOptions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryRedactOptions.swift; sourceTree = ""; }; FA67DCDD2DDBD4EA00896B02 /* SentryViewControllerBreadcrumbTracking.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryViewControllerBreadcrumbTracking.swift; sourceTree = ""; }; FA67DCDF2DDBD4EA00896B02 /* SentryDefaultMaskRenderer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryDefaultMaskRenderer.swift; sourceTree = ""; }; @@ -2509,7 +2513,7 @@ FABE8E162E307A7C0040809A /* Dependencies.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dependencies.swift; sourceTree = ""; }; FAC62B642E15A40C0003909D /* SentrySDKThreadTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentrySDKThreadTests.swift; sourceTree = ""; }; FAC735222E25AA7A006C5A64 /* SentryProfilingSwiftHelpersTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryProfilingSwiftHelpersTests.m; sourceTree = ""; }; - FACEED122E3179A10007B4AC /* SentyOptionsInternal.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentyOptionsInternal.m; sourceTree = ""; }; + FACEED122E3179A10007B4AC /* SentyOptionsHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentyOptionsHelper.m; sourceTree = ""; }; FAE2DAB72E1F317900262307 /* SentryProfilingSwiftHelpers.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryProfilingSwiftHelpers.m; sourceTree = ""; }; FAE2DAB92E1F318900262307 /* SentryProfilingSwiftHelpers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryProfilingSwiftHelpers.h; path = Sources/Sentry/include/SentryProfilingSwiftHelpers.h; sourceTree = SOURCE_ROOT; }; FAE5797E2E7CF21300B710F9 /* SentryMigrateSessionInit.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryMigrateSessionInit.swift; sourceTree = ""; }; @@ -2526,8 +2530,6 @@ FAEEC04C2E75E55A00E79CA9 /* SentrySerializationSwift.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentrySerializationSwift.swift; sourceTree = ""; }; FAEFA1292E4FAE1700C431D9 /* SentrySDKSettings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentrySDKSettings.swift; sourceTree = ""; }; FAF0F3CA2EA7DD0700E44E9B /* SentryANRTrackerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryANRTrackerTests.swift; sourceTree = ""; }; - FAF120122E70C088006E1DA3 /* SentryEnvelopeHeaderHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryEnvelopeHeaderHelper.h; path = include/SentryEnvelopeHeaderHelper.h; sourceTree = ""; }; - FAF120192E70C0EA006E1DA3 /* SentryEnvelopeHeaderHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryEnvelopeHeaderHelper.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -2751,8 +2753,8 @@ 630436011EBCB8CA00C4D3FA /* Protocol */ = { isa = PBXGroup; children = ( - FAF120122E70C088006E1DA3 /* SentryEnvelopeHeaderHelper.h */, - FAF120192E70C0EA006E1DA3 /* SentryEnvelopeHeaderHelper.m */, + FA27EBDB2EB639D100F2ECF7 /* SentryId.h */, + FA27EBDD2EB639D700F2ECF7 /* SentryId.m */, D8CB74182947285A00A5F964 /* SentryEnvelopeItemHeader.h */, D8CB741A2947286500A5F964 /* SentryEnvelopeItemHeader.m */, D8CB74142947246600A5F964 /* SentryEnvelopeAttachmentHeader.h */, @@ -3117,11 +3119,11 @@ 7B610D5E2512390E00B0B5D9 /* SentrySDK+Private.h */, FA6555132E30181B009917BC /* SentrySDKInternal.h */, FA6555152E30182B009917BC /* SentrySDKInternal.m */, - FACEED122E3179A10007B4AC /* SentyOptionsInternal.m */, + FACEED122E3179A10007B4AC /* SentyOptionsHelper.m */, 63EED6BC2237923600E02400 /* SentryOptions.h */, 63EED6BD2237923600E02400 /* SentryOptions.m */, 7BDEAA002632A4580001EA25 /* SentryOptions+Private.h */, - 7B2BB0012966F55900A1E102 /* SentryOptionsInternal.h */, + 7B2BB0012966F55900A1E102 /* SentryOptionsHelpers.h */, 7D9B079F23D1E89800C5FC8E /* SentryMeta.h */, 7D082B8023C628780029866B /* SentryMeta.m */, D4ECA3FF2E3CBEDE00C757EA /* SentryDummyPrivateEmptyClass.m */, @@ -4421,6 +4423,8 @@ D8B665BB2B95F5A100BD0E7B /* module.modulemap */, FA4C32962DF7513F001D7B00 /* SentryExperimentalOptions.swift */, FA4C32972DF7513F001D7B01 /* SentryAppState.swift */, + FA6251FE2EB52DD700BFC967 /* SentryHub.swift */, + FA6252052EB5489B00BFC967 /* SentryClient.swift */, ); path = Swift; sourceTree = ""; @@ -4947,7 +4951,6 @@ FA67DCDE2DDBD4EA00896B02 /* Protocol */ = { isa = PBXGroup; children = ( - FA67DCDB2DDBD4EA00896B02 /* SentryId.swift */, FA67DCDC2DDBD4EA00896B02 /* SentryRedactOptions.swift */, FA67DCDD2DDBD4EA00896B02 /* SentryViewControllerBreadcrumbTracking.swift */, ); @@ -5155,6 +5158,7 @@ 6304360A1EC0595B00C4D3FA /* SentryNSDataUtils.h in Headers */, FA6555142E30181B009917BC /* SentrySDKInternal.h in Headers */, 63FE718720DA4C1100CDBAE8 /* SentryCrashReportVersion.h in Headers */, + FA27EBDC2EB639D400F2ECF7 /* SentryId.h in Headers */, 0A56DA5F28ABA01B00C400D5 /* SentryTransactionContext+Private.h in Headers */, 8E7C98312693E1CC00E6336C /* SentryTraceHeader.h in Headers */, 62C316812B1F2E93000D7031 /* SentryDelayedFramesTracker.h in Headers */, @@ -5186,7 +5190,6 @@ D456B4382D706BFE007068CB /* SentrySpanDataKey.h in Headers */, 7B77BE3527EC8445003C9020 /* SentryDiscardReasonMapper.h in Headers */, 7B610D602512390E00B0B5D9 /* SentrySDK+Private.h in Headers */, - FAF120182E70C08F006E1DA3 /* SentryEnvelopeHeaderHelper.h in Headers */, 62A456E12B03704A003F19A1 /* SentryUIEventTrackerMode.h in Headers */, 03F84D2327DD414C008FE43F /* SentryThreadHandle.hpp in Headers */, FAAB964A2EA688D40030A2DB /* SentryANRStoppedResultInternal.h in Headers */, @@ -5203,7 +5206,7 @@ A8AFFCCF2906C03700967CD7 /* SentryRequest.h in Headers */, D82859442C3E753C009A28AA /* SentrySessionReplaySyncC.h in Headers */, 8459FCBE2BD73E820038E9C9 /* SentryProfilerSerialization.h in Headers */, - 7B2BB0032966F55900A1E102 /* SentryOptionsInternal.h in Headers */, + 7B2BB0032966F55900A1E102 /* SentryOptionsHelpers.h in Headers */, 7BF9EF762722B34700B5BBEF /* SentrySubClassFinder.h in Headers */, 7BC852332458802C005A70F0 /* SentryDataCategoryMapper.h in Headers */, 7BDB03B7251364F800BAE198 /* _SentryDispatchQueueWrapperInternal.h in Headers */, @@ -5729,7 +5732,6 @@ 7B3B473825D6CC7E00D01640 /* SentryNSError.m in Sources */, 621AE74D2C626C510012E730 /* SentryANRTrackerV2.m in Sources */, 84CFA4CA2C9DF884008DA5F4 /* SentryUserFeedbackWidget.swift in Sources */, - FAF1201A2E70C0EE006E1DA3 /* SentryEnvelopeHeaderHelper.m in Sources */, F49D419E2DEA3D0600D9244E /* SentryCrashExceptionApplicationHelper.m in Sources */, D4F56C5D2E9CF38900D57DAB /* SentryXcodeVersion.swift in Sources */, D8ACE3C82762187200F5A213 /* SentryFileIOTrackerHelper.m in Sources */, @@ -5886,7 +5888,6 @@ FA67DCF92DDBD4EA00896B02 /* HTTPHeaderSanitizer.swift in Sources */, FA67DCFA2DDBD4EA00896B02 /* SentryViewRendererV2.swift in Sources */, FAAB30F32E4E8F2C00FE8B7E /* SentryInAppLogic.swift in Sources */, - FA67DCFB2DDBD4EA00896B02 /* SentryId.swift in Sources */, FA67DCFC2DDBD4EA00896B02 /* SentryFramesDelayResult.swift in Sources */, FA67DCFD2DDBD4EA00896B02 /* SentryANRTracker.swift in Sources */, FA67DCFE2DDBD4EA00896B02 /* SentryANRTrackerV2Delegate.swift in Sources */, @@ -5897,6 +5898,7 @@ FA67DD002DDBD4EA00896B02 /* SentryMaskRenderer.swift in Sources */, FA67DD012DDBD4EA00896B02 /* SentryMXCallStackTree.swift in Sources */, FAAB29F12E3D252300ACD577 /* SentrySession.swift in Sources */, + FA6252042EB52DD900BFC967 /* SentryHub.swift in Sources */, FA67DD022DDBD4EA00896B02 /* SentryViewScreenshotProvider.swift in Sources */, FA67DD032DDBD4EA00896B02 /* SentryTransactionNameSource.swift in Sources */, FA67DD042DDBD4EA00896B02 /* SwiftDescriptor.swift in Sources */, @@ -5911,6 +5913,7 @@ FA6555162E30182B009917BC /* SentrySDKInternal.m in Sources */, FA67DD0D2DDBD4EA00896B02 /* SentryUIRedactBuilder.swift in Sources */, FA67DD0E2DDBD4EA00896B02 /* SentryFileContents.swift in Sources */, + FA27EBDE2EB639D900F2ECF7 /* SentryId.m in Sources */, FA67DD0F2DDBD4EA00896B02 /* SentryViewControllerBreadcrumbTracking.swift in Sources */, FA67DD102DDBD4EA00896B02 /* StringExtensions.swift in Sources */, FA67DD112DDBD4EA00896B02 /* SentryANRType.swift in Sources */, @@ -5970,6 +5973,7 @@ F4FE9DFE2E622CD70014FED5 /* SentryObjCRuntimeWrapper.swift in Sources */, 84A898542E163072009A551E /* SentryProfileConfiguration.m in Sources */, 849B8F9B2C6E906900148E1F /* SentryUserFeedbackIntegrationDriver.swift in Sources */, + FA6252062EB5489E00BFC967 /* SentryClient.swift in Sources */, FA3734862E0F09320091EF24 /* SentryDependencyContainerSwiftHelper.m in Sources */, 63FE70DF20DA4C1000CDBAE8 /* SentryCrashMonitorType.c in Sources */, D468C0622D3669A200964230 /* SentryFileIOTracker+SwiftHelpers.swift in Sources */, @@ -6075,7 +6079,7 @@ 636085141ED47BE600E8599E /* SentryFileManagerHelper.m in Sources */, 63FE710B20DA4C1000CDBAE8 /* SentryCrashMach.c in Sources */, 63FE707720DA4C1000CDBAE8 /* SentryDictionaryDeepSearch.m in Sources */, - FACEED132E3179A10007B4AC /* SentyOptionsInternal.m in Sources */, + FACEED132E3179A10007B4AC /* SentyOptionsHelper.m in Sources */, FAAB95C02EA163590030A2DB /* SentryScopeObserver.swift in Sources */, D48891D02E98F2E700212823 /* SentryInfoPlistError.swift in Sources */, 8482FA9C2DD7C397000E9283 /* SentryFeedbackAPI.m in Sources */, diff --git a/SentryTestUtils/SentryHub+Test.h b/SentryTestUtils/SentryHub+Test.h index a5cd0afda98..995c31c45c8 100644 --- a/SentryTestUtils/SentryHub+Test.h +++ b/SentryTestUtils/SentryHub+Test.h @@ -3,13 +3,14 @@ @class SentryClient; @class SentryCrashWrapper; @class SentryDispatchQueueWrapper; +@class SentryClientInternal; @protocol SentryIntegrationProtocol; NS_ASSUME_NONNULL_BEGIN /** Expose the internal test init for testing. */ -@interface SentryHub () +@interface SentryHubInternal () -- (instancetype)initWithClient:(SentryClient *_Nullable)client +- (instancetype)initWithClient:(SentryClientInternal *_Nullable)client andScope:(SentryScope *_Nullable)scope andCrashWrapper:(SentryCrashWrapper *)crashAdapter andDispatchQueue:(SentryDispatchQueueWrapper *)dispatchQueue; diff --git a/SentryTestUtils/TestClient.swift b/SentryTestUtils/TestClient.swift index 1779ea28be6..bb76f14e262 100644 --- a/SentryTestUtils/TestClient.swift +++ b/SentryTestUtils/TestClient.swift @@ -2,7 +2,7 @@ import _SentryPrivate import Foundation @_spi(Private) import Sentry -public class TestClient: SentryClient { +public class TestClient: SentryClientInternal { public override init?(options: Options) { super.init( options: options, diff --git a/SentryTestUtils/TestHub.swift b/SentryTestUtils/TestHub.swift index 686570508da..8b2e41bc3ed 100644 --- a/SentryTestUtils/TestHub.swift +++ b/SentryTestUtils/TestHub.swift @@ -2,7 +2,7 @@ import _SentryPrivate import Foundation @_spi(Private) @testable import Sentry -public class TestHub: SentryHub { +public class TestHub: SentryHubInternal { public var startSessionInvocations: Int = 0 public var closeCachedSessionInvocations: Int = 0 diff --git a/Sources/Resources/Sentry.modulemap b/Sources/Resources/Sentry.modulemap index 3b958eb485d..ee6bcebf30e 100644 --- a/Sources/Resources/Sentry.modulemap +++ b/Sources/Resources/Sentry.modulemap @@ -11,7 +11,7 @@ framework module Sentry { header "SentryAppStartMeasurement.h" header "SentryBreadcrumb+Private.h" header "SentryFormatter.h" - header "SentryOptionsInternal.h" + header "SentryOptionsHelpers.h" header "SentrySwizzle.h" header "SentryUser+Private.h" diff --git a/Sources/Sentry/Profiling/SentryLaunchProfiling.m b/Sources/Sentry/Profiling/SentryLaunchProfiling.m index 55b92853bf9..d038209f5a5 100644 --- a/Sources/Sentry/Profiling/SentryLaunchProfiling.m +++ b/Sources/Sentry/Profiling/SentryLaunchProfiling.m @@ -349,7 +349,7 @@ } void -sentry_stopAndDiscardLaunchProfileTracer(SentryHub *_Nullable hub) +sentry_stopAndDiscardLaunchProfileTracer(SentryHubInternal *_Nullable hub) { SENTRY_LOG_DEBUG(@"Finishing launch tracer."); sentry_launchTracer.hub = hub; diff --git a/Sources/Sentry/Profiling/SentryProfiledTracerConcurrency.mm b/Sources/Sentry/Profiling/SentryProfiledTracerConcurrency.mm index 8c0a7f66e71..dc47b983cfb 100644 --- a/Sources/Sentry/Profiling/SentryProfiledTracerConcurrency.mm +++ b/Sources/Sentry/Profiling/SentryProfiledTracerConcurrency.mm @@ -167,7 +167,7 @@ } void -sentry_discardProfilerCorrelatedToTrace(SentryId *internalTraceId, SentryHub *hub) +sentry_discardProfilerCorrelatedToTrace(SentryId *internalTraceId, SentryHubInternal *hub) { std::lock_guard l(_gStateLock); @@ -238,9 +238,9 @@ } void -sentry_stopProfilerDueToFinishedTransaction( - SentryHub *hub, SentryDispatchQueueWrapper *dispatchQueue, SentryTransaction *transaction, - BOOL isProfiling, NSDate *_Nullable traceStartTimestamp, uint64_t startSystemTime +sentry_stopProfilerDueToFinishedTransaction(SentryHubInternal *hub, + SentryDispatchQueueWrapper *dispatchQueue, SentryTransaction *transaction, BOOL isProfiling, + NSDate *_Nullable traceStartTimestamp, uint64_t startSystemTime # if SENTRY_HAS_UIKIT , SentryAppStartMeasurement *appStartMeasurement @@ -256,10 +256,11 @@ return; } - SentryClient *_Nullable client = hub.getClient; + SentryClientInternal *_Nullable client = hub.getClient; if (isProfiling && client != nil - && sentry_isContinuousProfilingEnabled(SENTRY_UNWRAP_NULLABLE(SentryClient, client)) - && sentry_isProfilingCorrelatedToTraces(SENTRY_UNWRAP_NULLABLE(SentryClient, client))) { + && sentry_isContinuousProfilingEnabled(SENTRY_UNWRAP_NULLABLE(SentryClientInternal, client)) + && sentry_isProfilingCorrelatedToTraces( + SENTRY_UNWRAP_NULLABLE(SentryClientInternal, client))) { SENTRY_LOG_DEBUG(@"Stopping tracking root span tracer with profilerReferenceId %@", sentry_stringFromSentryID(transaction.trace.profilerReferenceID)); sentry_stopTrackingRootSpanForContinuousProfilerV2(); @@ -334,7 +335,7 @@ } SentryId *_Nullable sentry_startProfilerForTrace(SentryTracerConfiguration *configuration, - SentryHub *_Nullable hub, SentryTransactionContext *transactionContext) + SentryHubInternal *_Nullable hub, SentryTransactionContext *transactionContext) { if (sentry_profileConfiguration.profileOptions != nil) { // launch profile; there's no hub to get options from, so they're read from the launch @@ -342,16 +343,17 @@ return _sentry_startContinuousProfilerV2ForTrace( sentry_profileConfiguration.profileOptions, transactionContext); } - SentryClient *_Nullable client = hub.getClient; + SentryClientInternal *_Nullable client = hub.getClient; if (client != nil - && sentry_isContinuousProfilingEnabled(SENTRY_UNWRAP_NULLABLE(SentryClient, client))) { + && sentry_isContinuousProfilingEnabled( + SENTRY_UNWRAP_NULLABLE(SentryClientInternal, client))) { // non launch profile if (sentry_getParentSpanID(transactionContext) != nil) { SENTRY_LOG_DEBUG(@"Not a root span, will not start automatically for trace lifecycle."); return nil; } SentryProfileOptions *_Nullable profilingOptions - = sentry_getProfiling(SENTRY_UNWRAP_NULLABLE(SentryClient, client)); + = sentry_getProfiling(SENTRY_UNWRAP_NULLABLE(SentryClientInternal, client)); if (profilingOptions == nil) { SENTRY_LOG_DEBUG(@"No profiling options found, will not start profiler."); return nil; diff --git a/Sources/Sentry/Profiling/SentryProfilerSerialization+Test.h b/Sources/Sentry/Profiling/SentryProfilerSerialization+Test.h index 7250a7facdd..109eaa2d6e3 100644 --- a/Sources/Sentry/Profiling/SentryProfilerSerialization+Test.h +++ b/Sources/Sentry/Profiling/SentryProfilerSerialization+Test.h @@ -8,7 +8,7 @@ # import "SentryProfiler+Private.h" @class SentryDebugMeta; -@class SentryHub; +@class SentryHubInternal; NS_ASSUME_NONNULL_BEGIN @@ -26,7 +26,7 @@ SENTRY_EXTERN NSString *sentry_profilerTruncationReasonName(SentryProfilerTrunca SENTRY_EXTERN NSMutableDictionary *sentry_serializedTraceProfileData( NSDictionary *profileData, uint64_t startSystemTime, uint64_t endSystemTime, NSString *truncationReason, NSDictionary *serializedMetrics, - NSArray *debugMeta, SentryHub *hub + NSArray *debugMeta, SentryHubInternal *hub # if SENTRY_HAS_UIKIT , SentryScreenFrames *gpuData diff --git a/Sources/Sentry/Profiling/SentryProfilerSerialization.m b/Sources/Sentry/Profiling/SentryProfilerSerialization.m index 6fbe3c3260a..f7d561fed5d 100644 --- a/Sources/Sentry/Profiling/SentryProfilerSerialization.m +++ b/Sources/Sentry/Profiling/SentryProfilerSerialization.m @@ -8,6 +8,7 @@ # import "SentryEnvelopeItemHeader.h" # import "SentryEvent+Private.h" # import "SentryFormatter.h" +# import "SentryHub.h" # import "SentryInternalDefines.h" # import "SentryLogC.h" # import "SentryMeta.h" @@ -110,7 +111,7 @@ sentry_serializedTraceProfileData( NSDictionary *profileData, uint64_t startSystemTime, uint64_t endSystemTime, NSString *truncationReason, NSDictionary *serializedMetrics, - NSArray *debugMeta, SentryHub *hub + NSArray *debugMeta, SentryHubInternal *hub # if SENTRY_HAS_UIKIT , SentryScreenFrames *gpuData @@ -222,7 +223,7 @@ NSMutableDictionary * sentry_serializedContinuousProfileChunk(SentryId *profileID, SentryId *chunkID, NSDictionary *profileData, NSDictionary *serializedMetrics, - NSArray *debugMeta, SentryHub *hub + NSArray *debugMeta, SentryHubInternal *hub # if SENTRY_HAS_UIKIT , SentryScreenFrames *gpuData @@ -358,7 +359,7 @@ # pragma clang diagnostic pop } -SentryEnvelopeItem *_Nullable sentry_traceProfileEnvelopeItem(SentryHub *hub, +SentryEnvelopeItem *_Nullable sentry_traceProfileEnvelopeItem(SentryHubInternal *hub, SentryProfiler *profiler, NSDictionary *profilingData, SentryTransaction *transaction, NSDate *startTimestamp) { @@ -414,7 +415,7 @@ } NSMutableDictionary *_Nullable sentry_collectProfileDataHybridSDK( - uint64_t startSystemTime, uint64_t endSystemTime, SentryId *traceId, SentryHub *hub) + uint64_t startSystemTime, uint64_t endSystemTime, SentryId *traceId, SentryHubInternal *hub) { SentryProfiler *profiler = sentry_profilerForFinishedTracer(traceId); if (!profiler) { diff --git a/Sources/Sentry/Profiling/SentryProfilingSwiftHelpers.m b/Sources/Sentry/Profiling/SentryProfilingSwiftHelpers.m index 1eb7fdfc2ee..ed498f13834 100644 --- a/Sources/Sentry/Profiling/SentryProfilingSwiftHelpers.m +++ b/Sources/Sentry/Profiling/SentryProfilingSwiftHelpers.m @@ -1,6 +1,7 @@ #import "SentryProfilingSwiftHelpers.h" #if SENTRY_TARGET_PROFILING_SUPPORTED +# import "SentryClient.h" # import "SentryLogC.h" # import "SentryOptions+Private.h" # import "SentryProfiler+Private.h" @@ -8,18 +9,18 @@ # import "SentrySwift.h" BOOL -sentry_isContinuousProfilingEnabled(SentryClient *client) +sentry_isContinuousProfilingEnabled(SentryClientInternal *client) { return [client.options isContinuousProfilingEnabled]; } BOOL -sentry_isProfilingCorrelatedToTraces(SentryClient *client) +sentry_isProfilingCorrelatedToTraces(SentryClientInternal *client) { return [client.options isProfilingCorrelatedToTraces]; } -SentryProfileOptions *_Nullable sentry_getProfiling(SentryClient *client) +SentryProfileOptions *_Nullable sentry_getProfiling(SentryClientInternal *client) { return client.options.profiling; } diff --git a/Sources/Sentry/Public/Sentry.h b/Sources/Sentry/Public/Sentry.h index 905baf336d3..c4857943740 100644 --- a/Sources/Sentry/Public/Sentry.h +++ b/Sources/Sentry/Public/Sentry.h @@ -10,7 +10,6 @@ FOUNDATION_EXPORT const unsigned char SentryVersionString[]; # import # import # import -# import # import # import # import @@ -23,7 +22,7 @@ FOUNDATION_EXPORT const unsigned char SentryVersionString[]; # import # import # import -# import +# import # import # import # import diff --git a/Sources/Sentry/Public/SentryId.h b/Sources/Sentry/Public/SentryId.h new file mode 100644 index 00000000000..5c37acc1ecb --- /dev/null +++ b/Sources/Sentry/Public/SentryId.h @@ -0,0 +1,48 @@ +#import +#if !defined(SWIFT_CLASS_PROPERTY) +# if __has_feature(objc_class_property) +# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +# else +# define SWIFT_CLASS_PROPERTY(...) +# endif +#endif + +#if !defined(OBJC_DESIGNATED_INITIALIZER) +# if __has_attribute(objc_designated_initializer) +# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +# else +# define OBJC_DESIGNATED_INITIALIZER +# endif +#endif + +NS_ASSUME_NONNULL_BEGIN + +@interface SentryId : NSObject + +/// A @c SentryId with an empty UUID “00000000000000000000000000000000”. +SWIFT_CLASS_PROPERTY(@property(nonatomic, class, readonly, strong) SentryId *_Nonnull empty;) ++ (SentryId *_Nonnull)empty __attribute__((warn_unused_result)); + +/// Returns a 32 lowercase character hexadecimal string description of the @c SentryId, such as +/// “12c2d058d58442709aa2eca08bf20986”. +@property (nonatomic, readonly, copy) NSString *_Nonnull sentryIdString; + +/// Creates a @c SentryId with a random UUID. +- (nonnull instancetype)init __attribute__((objc_designated_initializer)); + +/// Creates a SentryId with the given UUID. +- (nonnull instancetype)initWithUuid:(NSUUID *_Nonnull)uuid + __attribute__((objc_designated_initializer)); + +/// Creates a @c SentryId from a 32 character hexadecimal string without dashes such as +/// “12c2d058d58442709aa2eca08bf20986” or a 36 character hexadecimal string such as such as +/// “12c2d058-d584-4270-9aa2-eca08bf20986”. +/// @return SentryId.empty for invalid strings. +- (nonnull instancetype)initWithUUIDString:(NSString *_Nonnull)uuidString + __attribute__((objc_designated_initializer)); + +- (BOOL)isEqual:(id _Nullable)object __attribute__((warn_unused_result)); + +@end + +NS_ASSUME_NONNULL_END diff --git a/Sources/Sentry/Public/SentryWithoutUIKit.h b/Sources/Sentry/Public/SentryWithoutUIKit.h index 1b9597110a7..8557273b6b9 100644 --- a/Sources/Sentry/Public/SentryWithoutUIKit.h +++ b/Sources/Sentry/Public/SentryWithoutUIKit.h @@ -11,7 +11,6 @@ FOUNDATION_EXPORT const unsigned char SentryVersionString[]; # import # import # import -# import # import # import # import @@ -24,7 +23,7 @@ FOUNDATION_EXPORT const unsigned char SentryVersionString[]; # import # import # import -# import +# import # import # import # import diff --git a/Sources/Sentry/SentryClient.m b/Sources/Sentry/SentryClient.m index a607a8faeef..c0e4c35110d 100644 --- a/Sources/Sentry/SentryClient.m +++ b/Sources/Sentry/SentryClient.m @@ -10,8 +10,6 @@ #import "SentryDsn.h" #import "SentryEvent+Private.h" #import "SentryException.h" -#import "SentryHub+Private.h" -#import "SentryHub.h" #import "SentryInstallation.h" #import "SentryInternalDefines.h" #import "SentryLogC.h" @@ -46,7 +44,7 @@ NS_ASSUME_NONNULL_BEGIN -@interface SentryClient () +@interface SentryClientInternal () @property (nonatomic, strong) SentryTransportAdapter *transportAdapter; @property (nonatomic, strong) SentryDebugImageProvider *debugImageProvider; @@ -58,7 +56,7 @@ @interface SentryClient () NSString *const DropSessionLogMessage = @"Session has no release name. Won't send it."; -@implementation SentryClient +@implementation SentryClientInternal - (_Nullable instancetype)initWithOptions:(SentryOptions *)options { @@ -82,6 +80,7 @@ - (_Nullable instancetype)initWithOptions:(SentryOptions *)options SentryTransportAdapter *transportAdapter = [[SentryTransportAdapter alloc] initWithTransports:transports options:options]; + SentryDefaultThreadInspector *threadInspector = [[SentryDefaultThreadInspector alloc] initWithOptions:options]; diff --git a/Sources/Sentry/SentryDependencyContainerSwiftHelper.m b/Sources/Sentry/SentryDependencyContainerSwiftHelper.m index a0e00ea42de..c47141b27b9 100644 --- a/Sources/Sentry/SentryDependencyContainerSwiftHelper.m +++ b/Sources/Sentry/SentryDependencyContainerSwiftHelper.m @@ -63,26 +63,21 @@ + (void)dispatchSyncOnMainQueue:(void (^)(void))block [SentryDependencyContainer.sharedInstance.dispatchQueueWrapper dispatchSyncOnMainQueue:block]; } -+ (SentryHub *)currentHub -{ - return SentrySDKInternal.currentHub; -} - + (nullable NSDate *)readTimestampLastInForeground { - SentryHub *hub = [SentrySDKInternal currentHub]; + SentryHubInternal *hub = [SentrySDKInternal currentHub]; return [[[hub getClient] fileManager] readTimestampLastInForeground]; } + (void)deleteTimestampLastInForeground { - SentryHub *hub = [SentrySDKInternal currentHub]; + SentryHubInternal *hub = [SentrySDKInternal currentHub]; [[[hub getClient] fileManager] deleteTimestampLastInForeground]; } + (void)storeTimestampLastInForeground:(NSDate *)timestamp { - SentryHub *hub = [SentrySDKInternal currentHub]; + SentryHubInternal *hub = [SentrySDKInternal currentHub]; [[[hub getClient] fileManager] storeTimestampLastInForeground:timestamp]; } diff --git a/Sources/Sentry/SentryEnvelopeHeaderHelper.m b/Sources/Sentry/SentryEnvelopeHeaderHelper.m deleted file mode 100644 index 00a8723b3e1..00000000000 --- a/Sources/Sentry/SentryEnvelopeHeaderHelper.m +++ /dev/null @@ -1,12 +0,0 @@ -#import "SentryEnvelopeHeaderHelper.h" -#import "SentrySDKInternal.h" -#import "SentrySwift.h" - -@implementation SentryEnvelopeHeaderHelper - -+ (SentryIdWrapper *)headerIdFromEvent:(SentryEvent *)event -{ - return [[SentryIdWrapper alloc] initWithId:event.eventId.sentryIdString]; -} - -@end diff --git a/Sources/Sentry/SentryHub.m b/Sources/Sentry/SentryHub.m index c40fb648584..bdb50f52928 100644 --- a/Sources/Sentry/SentryHub.m +++ b/Sources/Sentry/SentryHub.m @@ -26,9 +26,9 @@ NS_ASSUME_NONNULL_BEGIN -@interface SentryHub () +@interface SentryHubInternal () -@property (nullable, atomic, strong) SentryClient *client; +@property (nullable, atomic, strong) SentryClientInternal *client; @property (nullable, nonatomic, strong) SentryScope *scope; @property (nonatomic) SentryDispatchQueueWrapper *dispatchQueue; @property (nonatomic, strong) SentryCrashWrapper *crashWrapper; @@ -38,12 +38,12 @@ @interface SentryHub () @end -@implementation SentryHub { +@implementation SentryHubInternal { NSObject *_sessionLock; NSObject *_integrationsLock; } -- (instancetype)initWithClient:(nullable SentryClient *)client +- (instancetype)initWithClient:(nullable SentryClientInternal *)client andScope:(nullable SentryScope *)scope { return [self initWithClient:client @@ -53,7 +53,7 @@ - (instancetype)initWithClient:(nullable SentryClient *)client } /** Internal constructor for testing */ -- (instancetype)initWithClient:(nullable SentryClient *)client +- (instancetype)initWithClient:(nullable SentryClientInternal *)client andScope:(nullable SentryScope *)scope andCrashWrapper:(SentryCrashWrapper *)crashWrapper andDispatchQueue:(SentryDispatchQueueWrapper *)dispatchQueue @@ -170,7 +170,7 @@ - (void)closeCachedSessionWithTimestamp:(nullable NSDate *)timestamp SENTRY_LOG_DEBUG(@"A cached session was found."); // Make sure there's a client bound. - SentryClient *client = self.client; + SentryClientInternal *client = self.client; if (client == nil) { SENTRY_LOG_DEBUG(@"No client bound."); return; @@ -200,7 +200,7 @@ - (void)captureSession:(nullable SentrySession *)session return; } - SentryClient *client = self.client; + SentryClientInternal *client = self.client; if (client.options.diagnosticLevel == kSentryLevelDebug) { SENTRY_LOG_DEBUG(@"Capturing session with status: %@", [self createSessionDebugString:SENTRY_UNWRAP_NULLABLE(SentrySession, session)]); @@ -237,7 +237,7 @@ - (void)captureFatalEvent:(SentryEvent *)event withScope:(SentryScope *)scope { event.isFatalEvent = YES; - SentryClient *client = self.client; + SentryClientInternal *client = self.client; if (client == nil) { return; } @@ -267,7 +267,7 @@ - (void)captureFatalAppHangEvent:(SentryEvent *)event // We treat fatal app hang events similar to crashes. event.isFatalEvent = YES; - SentryClient *_Nullable client = _client; + SentryClientInternal *_Nullable client = _client; if (client == nil) { return; } @@ -314,7 +314,7 @@ - (void)captureTransaction:(SentryTransaction *)transaction // When a user calls finish on a transaction, which calls captureTransaction, the calling thread // here could be the main thread, which we only want to block as long as required. Therefore, we // capture the transaction on a background thread. - __weak SentryHub *weakSelf = self; + __weak SentryHubInternal *weakSelf = self; [self.dispatchQueue dispatchAsyncWithBlock:^{ [weakSelf captureEvent:transaction withScope:scope @@ -331,7 +331,7 @@ - (void)saveCrashTransaction:(SentryTransaction *)transaction return; } - SentryClient *client = self.client; + SentryClientInternal *client = self.client; if (client != nil) { [client saveCrashTransaction:transaction withScope:self.scope]; } @@ -351,7 +351,7 @@ - (SentryId *)captureEvent:(SentryEvent *)event withScope:(SentryScope *)scope additionalEnvelopeItems:(NSArray *)additionalEnvelopeItems { - SentryClient *client = self.client; + SentryClientInternal *client = self.client; if (client != nil) { return [client captureEvent:event withScope:scope @@ -475,7 +475,7 @@ - (SentryId *)captureMessage:(NSString *)message - (SentryId *)captureMessage:(NSString *)message withScope:(SentryScope *)scope { - SentryClient *client = self.client; + SentryClientInternal *client = self.client; if (client != nil) { return [client captureMessage:message withScope:scope]; } @@ -490,7 +490,7 @@ - (SentryId *)captureError:(NSError *)error - (SentryId *)captureError:(NSError *)error withScope:(SentryScope *)scope { SentrySession *currentSession = _session; - SentryClient *client = self.client; + SentryClientInternal *client = self.client; if (client != nil) { if (currentSession != nil) { return [client captureError:error @@ -512,7 +512,7 @@ - (SentryId *)captureException:(NSException *)exception - (SentryId *)captureException:(NSException *)exception withScope:(SentryScope *)scope { SentrySession *currentSession = _session; - SentryClient *client = self.client; + SentryClientInternal *client = self.client; if (client != nil) { if (currentSession != nil) { return [client captureException:exception @@ -528,7 +528,7 @@ - (SentryId *)captureException:(NSException *)exception withScope:(SentryScope * - (void)captureFeedback:(SentryFeedback *)feedback { - SentryClient *client = self.client; + SentryClientInternal *client = self.client; if (client != nil) { [client captureFeedback:feedback withScope:self.scope]; } @@ -538,7 +538,7 @@ - (void)captureSerializedFeedback:(NSDictionary *)serializedFeedback withEventId:(NSString *)feedbackEventId attachments:(NSArray *)feedbackAttachments { - SentryClient *client = self.client; + SentryClientInternal *client = self.client; if (client != nil) { [client captureSerializedFeedback:serializedFeedback withEventId:feedbackEventId @@ -565,12 +565,12 @@ - (void)addBreadcrumb:(SentryBreadcrumb *)crumb [self.scope addBreadcrumb:SENTRY_UNWRAP_NULLABLE(SentryBreadcrumb, nullableCrumb)]; } -- (nullable SentryClient *)getClient +- (nullable SentryClientInternal *)getClient { return self.client; } -- (void)bindClient:(nullable SentryClient *)client +- (void)bindClient:(nullable SentryClientInternal *)client { self.client = client; } @@ -579,7 +579,7 @@ - (SentryScope *)scope { @synchronized(self) { if (_scope == nil) { - SentryClient *client = self.client; + SentryClientInternal *client = self.client; if (client != nil) { _scope = [[SentryScope alloc] initWithMaxBreadcrumbs:client.options.maxBreadcrumbs]; } else { @@ -595,7 +595,7 @@ - (SentryScope *)scope - (void)configureScope:(void (^)(SentryScope *scope))callback { SentryScope *scope = self.scope; - SentryClient *client = _client; + SentryClientInternal *client = _client; if (client != nil && scope != nil) { callback(scope); } @@ -687,7 +687,7 @@ - (void)setUser:(nullable SentryUser *)user */ - (void)storeEnvelope:(SentryEnvelope *)envelope { - SentryClient *client = self.client; + SentryClientInternal *client = self.client; if (client == nil) { return; } @@ -699,7 +699,7 @@ - (void)storeEnvelope:(SentryEnvelope *)envelope - (void)captureEnvelope:(SentryEnvelope *)envelope { - SentryClient *client = self.client; + SentryClientInternal *client = self.client; if (client == nil) { return; } @@ -809,7 +809,7 @@ - (NSString *)createSessionDebugString:(SentrySession *)session - (void)flush:(NSTimeInterval)timeout { - SentryClient *client = self.client; + SentryClientInternal *client = self.client; if (client != nil) { [client flush:timeout]; } diff --git a/Sources/Sentry/SentryId.m b/Sources/Sentry/SentryId.m new file mode 100644 index 00000000000..2657fc52228 --- /dev/null +++ b/Sources/Sentry/SentryId.m @@ -0,0 +1,95 @@ +#import "SentryId.h" + +@interface SentryId () + +@property (nonatomic) NSUUID *id; + +@end + +@implementation SentryId + ++ (SentryId *)empty +{ + return [[SentryId alloc] initWithUUIDString:@"00000000-0000-0000-0000-000000000000"]; +} + +- (nonnull instancetype)init +{ + if (self = [super init]) { + self.id = NSUUID.UUID; + return self; + } + return nil; +} + +- (BOOL)isEqual:(id _Nullable)object +{ + if ([object isKindOfClass:[SentryId class]]) { + return [self.id isEqual:((SentryId *)object).id]; + } + return NO; +} + +- (NSString *)sentryIdString +{ + return [self.id.UUIDString stringByReplacingOccurrencesOfString:@"-" withString:@""] + .lowercaseString; +} + +- (nonnull instancetype)initWithUuid:(NSUUID *_Nonnull)uuid +{ + if (self = [super init]) { + self.id = uuid; + return self; + } + return nil; +} + +- (nonnull instancetype)initWithUUIDString:(NSString *_Nonnull)uuidString +{ + if (self = [super init]) { + // Try to create UUID directly from the provided string + NSUUID *parsed = [[NSUUID alloc] initWithUUIDString:uuidString]; + if (parsed != nil) { + self.id = parsed; + return self; + } + + // If it's a 32-char hex string, insert dashes at 8-12-16-20 and try again + if (uuidString.length == 32) { + // Ensure the characters are hex; if not, we still attempt formatting like the Swift + // code + NSMutableString *dashed = [NSMutableString stringWithCapacity:36]; + for (NSUInteger i = 0; i < uuidString.length; i++) { + if (i == 8 || i == 12 || i == 16 || i == 20) { + [dashed appendString:@"-"]; + } + unichar c = [uuidString characterAtIndex:i]; + [dashed appendFormat:@"%C", c]; + } + NSUUID *reparsed = [[NSUUID alloc] initWithUUIDString:dashed]; + if (reparsed != nil) { + self.id = reparsed; + return self; + } + } + + // Fallback: zero UUID; if that ever fails (it shouldn't), use a random UUID + NSUUID *zero = [[NSUUID alloc] initWithUUIDString:@"00000000-0000-0000-0000-000000000000"]; + self.id = zero ?: [NSUUID UUID]; + return self; + } + return nil; +} + +- (NSUInteger)hash +{ + return self.id.hash; +} + +- (NSString *)description +{ + return self.sentryIdString; +} + +@end diff --git a/Sources/Sentry/SentryOptions.m b/Sources/Sentry/SentryOptions.m index 3cc73ae9a27..4f8f7b19b32 100644 --- a/Sources/Sentry/SentryOptions.m +++ b/Sources/Sentry/SentryOptions.m @@ -12,7 +12,7 @@ #import "SentryMeta.h" #import "SentryNetworkTrackingIntegration.h" #import "SentryOptions+Private.h" -#import "SentryOptionsInternal.h" +#import "SentryOptionsHelpers.h" #import "SentrySDKInternal.h" #import "SentryScope.h" #import "SentrySessionReplayIntegration.h" @@ -46,7 +46,7 @@ - (void)setBeforeSendLogDynamic:(id)beforeSendLogDynamic + (NSArray *)defaultIntegrations { - NSArray *defaultIntegrationClasses = [SentryOptionsInternal defaultIntegrationClasses]; + NSArray *defaultIntegrationClasses = [SentryOptionsHelpers defaultIntegrationClasses]; NSMutableArray *defaultIntegrationNames = [[NSMutableArray alloc] initWithCapacity:defaultIntegrationClasses.count]; diff --git a/Sources/Sentry/SentryProfiler.mm b/Sources/Sentry/SentryProfiler.mm index 56c2054dee3..28ee9ede3a7 100644 --- a/Sources/Sentry/SentryProfiler.mm +++ b/Sources/Sentry/SentryProfiler.mm @@ -102,7 +102,7 @@ } void -sentry_sdkInitProfilerTasks(SentryOptions *options, SentryHub *hub) +sentry_sdkInitProfilerTasks(SentryOptions *options, SentryHubInternal *hub) { // get the configuration options from the last time the launch config was written; it may be // different than the new options the SDK was just started with diff --git a/Sources/Sentry/SentryReplayApi.m b/Sources/Sentry/SentryReplayApi.m index 493dabdcb6a..d32af680090 100644 --- a/Sources/Sentry/SentryReplayApi.m +++ b/Sources/Sentry/SentryReplayApi.m @@ -2,6 +2,7 @@ #if SENTRY_TARGET_REPLAY_SUPPORTED +# import "SentryClient.h" # import "SentryHub+Private.h" # import "SentryInternalCDefines.h" # import "SentryInternalDefines.h" diff --git a/Sources/Sentry/SentrySDKInternal.m b/Sources/Sentry/SentrySDKInternal.m index b0cff51e8be..787406d5c20 100644 --- a/Sources/Sentry/SentrySDKInternal.m +++ b/Sources/Sentry/SentrySDKInternal.m @@ -10,7 +10,7 @@ #import "SentryLogC.h" #import "SentryMeta.h" #import "SentryOptions+Private.h" -#import "SentryOptionsInternal.h" +#import "SentryOptionsHelpers.h" #import "SentryProfilingConditionals.h" #import "SentryReplayApi.h" #import "SentrySamplerDecision.h" @@ -38,44 +38,17 @@ # import "SentryProfiler+Private.h" #endif // SENTRY_TARGET_PROFILING_SUPPORTED -@implementation SentryIdWrapper - -- (instancetype)initWithId:(NSString *)sentryIdString -{ - if (self = [super init]) { - self.sentryIdString = sentryIdString; - return self; - } - return nil; -} - -- (SentryId *)sentryId -{ - return [[SentryId alloc] initWithUUIDString:self.sentryIdString]; -} - -@end - -@implementation SentryId (Wrapper) - -- (SentryIdWrapper *)wrapper -{ - return [[SentryIdWrapper alloc] initWithId:self.sentryIdString]; -} - -@end - NSString *const SENTRY_XCODE_PREVIEW_ENVIRONMENT_KEY = @"XCODE_RUNNING_FOR_PREVIEWS"; @interface SentrySDKInternal () -@property (class) SentryHub *currentHub; +@property (class) SentryHubInternal *currentHub; @end NS_ASSUME_NONNULL_BEGIN @implementation SentrySDKInternal -static SentryHub *_Nullable currentHub; +static SentryHubInternal *_Nullable currentHub; static NSObject *currentHubLock; static BOOL crashedLastRunCalled; static SentryAppStartMeasurement *_Nullable sentrySDKappStartMeasurement; @@ -106,13 +79,13 @@ + (void)initialize } } -+ (SentryHub *)currentHub ++ (SentryHubInternal *)currentHub { @synchronized(currentHubLock) { if (nil == currentHub) { - currentHub = [[SentryHub alloc] initWithClient:nil andScope:nil]; + currentHub = [[SentryHubInternal alloc] initWithClient:nil andScope:nil]; } - return SENTRY_UNWRAP_NULLABLE(SentryHub, currentHub); + return SENTRY_UNWRAP_NULLABLE(SentryHubInternal, currentHub); } } @@ -133,7 +106,7 @@ + (SentryReplayApi *)replay #endif /** Internal, only needed for testing. */ -+ (void)setCurrentHub:(nullable SentryHub *)hub ++ (void)setCurrentHub:(nullable SentryHubInternal *)hub { @synchronized(currentHubLock) { currentHub = hub; @@ -256,7 +229,7 @@ + (void)startWithOptions:(SentryOptions *)options startInvocations++; startTimestamp = [SentryDependencyContainer.sharedInstance.dateProvider date]; - SentryClient *newClient = [[SentryClient alloc] initWithOptions:options]; + SentryClientInternal *newClient = [[SentryClientInternal alloc] initWithOptions:options]; [newClient.fileManager moveAppStateToPreviousAppState]; [newClient.fileManager moveBreadcrumbsToPreviousBreadcrumbs]; [SentryDependencyContainer.sharedInstance @@ -278,7 +251,8 @@ + (void)startWithOptions:(SentryOptions *)options // The Hub needs to be initialized with a client so that closing a session // can happen. - SentryHub *hub = [[SentryHub alloc] initWithClient:newClient andScope:scope]; + SentryHubInternal *hub = [[SentryHubInternal alloc] initWithClient:newClient + andScope:scope]; [SentrySDKInternal setCurrentHub:hub]; [SentryDependencyContainer.sharedInstance.crashWrapper startBinaryImageCache]; @@ -320,21 +294,21 @@ + (void)captureFatalAppHangEvent:(SentryEvent *)event #endif // SENTRY_HAS_UIKIT -+ (SentryIdWrapper *)captureEvent:(SentryEvent *)event ++ (SentryId *)captureEvent:(SentryEvent *)event { return [SentrySDKInternal captureEvent:event withScope:SentrySDKInternal.currentHub.scope]; } -+ (SentryIdWrapper *)captureEvent:(SentryEvent *)event withScopeBlock:(void (^)(SentryScope *))block ++ (SentryId *)captureEvent:(SentryEvent *)event withScopeBlock:(void (^)(SentryScope *))block { SentryScope *scope = [[SentryScope alloc] initWithScope:SentrySDKInternal.currentHub.scope]; block(scope); return [SentrySDKInternal captureEvent:event withScope:scope]; } -+ (SentryIdWrapper *)captureEvent:(SentryEvent *)event withScope:(SentryScope *)scope ++ (SentryId *)captureEvent:(SentryEvent *)event withScope:(SentryScope *)scope { - return [SentrySDKInternal.currentHub captureEvent:event withScope:scope].wrapper; + return [SentrySDKInternal.currentHub captureEvent:event withScope:scope]; } + (id)startTransactionWithName:(NSString *)name operation:(NSString *)operation @@ -379,41 +353,40 @@ + (SentryIdWrapper *)captureEvent:(SentryEvent *)event withScope:(SentryScope *) customSamplingContext:customSamplingContext]; } -+ (SentryIdWrapper *)captureError:(NSError *)error ++ (SentryId *)captureError:(NSError *)error { return [SentrySDKInternal captureError:error withScope:SentrySDKInternal.currentHub.scope]; } -+ (SentryIdWrapper *)captureError:(NSError *)error - withScopeBlock:(void (^)(SentryScope *_Nonnull))block ++ (SentryId *)captureError:(NSError *)error withScopeBlock:(void (^)(SentryScope *_Nonnull))block { SentryScope *scope = [[SentryScope alloc] initWithScope:SentrySDKInternal.currentHub.scope]; block(scope); return [SentrySDKInternal captureError:error withScope:scope]; } -+ (SentryIdWrapper *)captureError:(NSError *)error withScope:(SentryScope *)scope ++ (SentryId *)captureError:(NSError *)error withScope:(SentryScope *)scope { - return [SentrySDKInternal.currentHub captureError:error withScope:scope].wrapper; + return [SentrySDKInternal.currentHub captureError:error withScope:scope]; } -+ (SentryIdWrapper *)captureException:(NSException *)exception ++ (SentryId *)captureException:(NSException *)exception { return [SentrySDKInternal captureException:exception withScope:SentrySDKInternal.currentHub.scope]; } -+ (SentryIdWrapper *)captureException:(NSException *)exception - withScopeBlock:(void (^)(SentryScope *))block ++ (SentryId *)captureException:(NSException *)exception + withScopeBlock:(void (^)(SentryScope *))block { SentryScope *scope = [[SentryScope alloc] initWithScope:SentrySDKInternal.currentHub.scope]; block(scope); return [SentrySDKInternal captureException:exception withScope:scope]; } -+ (SentryIdWrapper *)captureException:(NSException *)exception withScope:(SentryScope *)scope ++ (SentryId *)captureException:(NSException *)exception withScope:(SentryScope *)scope { - return [SentrySDKInternal.currentHub captureException:exception withScope:scope].wrapper; + return [SentrySDKInternal.currentHub captureException:exception withScope:scope]; } #if TARGET_OS_OSX @@ -427,28 +400,26 @@ + (SentryId *)captureCrashOnException:(NSException *)exception userInfo:exception.userInfo callStackReturnAddresses:exception.callStackReturnAddresses]; return [SentrySDKInternal captureException:wrappedException - withScope:SentrySDKInternal.currentHub.scope] - .sentryId; + withScope:SentrySDKInternal.currentHub.scope]; } #endif // TARGET_OS_OSX -+ (SentryIdWrapper *)captureMessage:(NSString *)message ++ (SentryId *)captureMessage:(NSString *)message { return [SentrySDKInternal captureMessage:message withScope:SentrySDKInternal.currentHub.scope]; } -+ (SentryIdWrapper *)captureMessage:(NSString *)message - withScopeBlock:(void (^)(SentryScope *))block ++ (SentryId *)captureMessage:(NSString *)message withScopeBlock:(void (^)(SentryScope *))block { SentryScope *scope = [[SentryScope alloc] initWithScope:SentrySDKInternal.currentHub.scope]; block(scope); return [SentrySDKInternal captureMessage:message withScope:scope]; } -+ (SentryIdWrapper *)captureMessage:(NSString *)message withScope:(SentryScope *)scope ++ (SentryId *)captureMessage:(NSString *)message withScope:(SentryScope *)scope { - return [SentrySDKInternal.currentHub captureMessage:message withScope:scope].wrapper; + return [SentrySDKInternal.currentHub captureMessage:message withScope:scope]; } /** @@ -561,7 +532,7 @@ + (void)installIntegrations SentryOptions *options = [SentrySDKInternal.currentHub getClient].options; NSMutableArray *integrationNames = [SentryOptions defaultIntegrations].mutableCopy; - NSArray *defaultIntegrations = SentryOptionsInternal.defaultIntegrationClasses; + NSArray *defaultIntegrations = SentryOptionsHelpers.defaultIntegrationClasses; // Since 8.22.0, we use a precompiled XCFramework for SPM, which can lead to Sentry's // definition getting duplicated in the app with a warning “SentrySDK is defined in both @@ -646,7 +617,7 @@ + (void)close startTimestamp = nil; - SentryHub *hub = SentrySDKInternal.currentHub; + SentryHubInternal *hub = SentrySDKInternal.currentHub; [hub removeAllIntegrations]; SENTRY_LOG_DEBUG(@"Uninstalled all integrations."); diff --git a/Sources/Sentry/SentryScreenshotIntegration.m b/Sources/Sentry/SentryScreenshotIntegration.m index f76b44f0866..14d90ca6fb8 100644 --- a/Sources/Sentry/SentryScreenshotIntegration.m +++ b/Sources/Sentry/SentryScreenshotIntegration.m @@ -24,7 +24,7 @@ [screenshotSource saveScreenShots:reportPath]; } -@interface SentryScreenshotIntegration () +@interface SentryScreenshotIntegration () @property (nonatomic, strong) SentryOptions *options; @@ -40,7 +40,7 @@ - (BOOL)installWithOptions:(nonnull SentryOptions *)options return NO; } - SentryClient *client = [SentrySDKInternal.currentHub getClient]; + SentryClientInternal *client = [SentrySDKInternal.currentHub getClient]; [client addAttachmentProcessor:self]; sentrycrash_setSaveScreenshots(&saveScreenShot); @@ -57,7 +57,7 @@ - (void)uninstall { sentrycrash_setSaveScreenshots(NULL); - SentryClient *client = [SentrySDKInternal.currentHub getClient]; + SentryClientInternal *client = [SentrySDKInternal.currentHub getClient]; [client removeAttachmentProcessor:self]; } diff --git a/Sources/Sentry/SentryTracer.m b/Sources/Sentry/SentryTracer.m index 7f4b9cb0736..77c1058533f 100644 --- a/Sources/Sentry/SentryTracer.m +++ b/Sources/Sentry/SentryTracer.m @@ -102,7 +102,7 @@ + (void)initialize } - (instancetype)initWithTransactionContext:(SentryTransactionContext *)transactionContext - hub:(nullable SentryHub *)hub + hub:(nullable SentryHubInternal *)hub { return [self initWithTransactionContext:transactionContext hub:hub @@ -110,7 +110,7 @@ - (instancetype)initWithTransactionContext:(SentryTransactionContext *)transacti } - (instancetype)initWithTransactionContext:(SentryTransactionContext *)transactionContext - hub:(nullable SentryHub *)hub + hub:(nullable SentryHubInternal *)hub configuration:(SentryTracerConfiguration *)configuration; { if (!(self = [super initWithContext:transactionContext diff --git a/Sources/Sentry/SentryViewHierarchyIntegration.m b/Sources/Sentry/SentryViewHierarchyIntegration.m index c3cd68a0b1e..3b5c37fbd56 100644 --- a/Sources/Sentry/SentryViewHierarchyIntegration.m +++ b/Sources/Sentry/SentryViewHierarchyIntegration.m @@ -43,7 +43,7 @@ - (BOOL)installWithOptions:(nonnull SentryOptions *)options self.options = options; - SentryClient *client = [SentrySDKInternal.currentHub getClient]; + SentryClientInternal *client = [SentrySDKInternal.currentHub getClient]; [client addAttachmentProcessor:self]; sentrycrash_setSaveViewHierarchy(&saveViewHierarchy); @@ -62,7 +62,7 @@ - (void)uninstall { sentrycrash_setSaveViewHierarchy(NULL); - SentryClient *client = [SentrySDKInternal.currentHub getClient]; + SentryClientInternal *client = [SentrySDKInternal.currentHub getClient]; [client removeAttachmentProcessor:self]; } diff --git a/Sources/Sentry/SentyOptionsInternal.m b/Sources/Sentry/SentyOptionsHelper.m similarity index 98% rename from Sources/Sentry/SentyOptionsInternal.m rename to Sources/Sentry/SentyOptionsHelper.m index 3a77d2b5196..4c24faafd4e 100644 --- a/Sources/Sentry/SentyOptionsInternal.m +++ b/Sources/Sentry/SentyOptionsHelper.m @@ -10,7 +10,7 @@ #import "SentryNetworkTrackingIntegration.h" #import "SentryOptions+Private.h" #import "SentryOptions.h" -#import "SentryOptionsInternal.h" +#import "SentryOptionsHelpers.h" #import "SentrySessionReplayIntegration.h" #import "SentrySwift.h" #import "SentrySwiftAsyncIntegration.h" @@ -30,7 +30,7 @@ # import "SentryMetricKitIntegration.h" #endif // SENTRY_HAS_METRIC_KIT -@implementation SentryOptionsInternal +@implementation SentryOptionsHelpers + (NSArray *)defaultIntegrationClasses { @@ -71,9 +71,9 @@ + (nullable SentryOptions *)initWithDict:(NSDictionary *)options didFailWithError:(NSError *_Nullable *_Nullable)error { SentryOptions *sentryOptions = [[SentryOptions alloc] init]; - if (![SentryOptionsInternal validateOptions:options - sentryOptions:sentryOptions - didFailWithError:error]) { + if (![SentryOptionsHelpers validateOptions:options + sentryOptions:sentryOptions + didFailWithError:error]) { if (error != nil) { SENTRY_LOG_ERROR(@"Failed to initialize SentryOptions: %@", *error); } else { diff --git a/Sources/Sentry/include/HybridPublic/SentryOptionsInternal.h b/Sources/Sentry/include/HybridPublic/SentryOptionsHelpers.h similarity index 89% rename from Sources/Sentry/include/HybridPublic/SentryOptionsInternal.h rename to Sources/Sentry/include/HybridPublic/SentryOptionsHelpers.h index 205f32074ee..245eb588f62 100644 --- a/Sources/Sentry/include/HybridPublic/SentryOptionsInternal.h +++ b/Sources/Sentry/include/HybridPublic/SentryOptionsHelpers.h @@ -4,7 +4,7 @@ NS_ASSUME_NONNULL_BEGIN -@interface SentryOptionsInternal : NSObject +@interface SentryOptionsHelpers : NSObject @property (nonatomic, readonly, class) NSArray *defaultIntegrationClasses; diff --git a/Sources/Sentry/include/SentryClient+Logs.h b/Sources/Sentry/include/SentryClient+Logs.h index b25c951d5a0..348924e9e7a 100644 --- a/Sources/Sentry/include/SentryClient+Logs.h +++ b/Sources/Sentry/include/SentryClient+Logs.h @@ -2,7 +2,7 @@ NS_ASSUME_NONNULL_BEGIN -@interface SentryClient () +@interface SentryClientInternal () /** * Helper to capture encoded logs, as SentryEnvelope can't be used in the Swift SDK. diff --git a/Sources/Sentry/include/SentryClient+Private.h b/Sources/Sentry/include/SentryClient+Private.h index 4d8bef564a4..50cb527a025 100644 --- a/Sources/Sentry/include/SentryClient+Private.h +++ b/Sources/Sentry/include/SentryClient+Private.h @@ -21,7 +21,7 @@ NS_ASSUME_NONNULL_BEGIN @end -@interface SentryClient () +@interface SentryClientInternal () @property (nonatomic, strong) NSMutableArray> *attachmentProcessors; diff --git a/Sources/Sentry/Public/SentryClient.h b/Sources/Sentry/include/SentryClient.h similarity index 99% rename from Sources/Sentry/Public/SentryClient.h rename to Sources/Sentry/include/SentryClient.h index 19d0d22de29..b159358b4bb 100644 --- a/Sources/Sentry/Public/SentryClient.h +++ b/Sources/Sentry/include/SentryClient.h @@ -8,14 +8,14 @@ @class SentryEvent; @class SentryFeedback; -@class SentryId; @class SentryOptions; @class SentryScope; +@class SentryId; @class SentryTransaction; NS_ASSUME_NONNULL_BEGIN -@interface SentryClient : NSObject +@interface SentryClientInternal : NSObject SENTRY_NO_INIT @property (nonatomic, assign, readonly) BOOL isEnabled; diff --git a/Sources/Sentry/include/SentryDependencyContainerSwiftHelper.h b/Sources/Sentry/include/SentryDependencyContainerSwiftHelper.h index f1f1afbc4ab..2a17f0d13c4 100644 --- a/Sources/Sentry/include/SentryDependencyContainerSwiftHelper.h +++ b/Sources/Sentry/include/SentryDependencyContainerSwiftHelper.h @@ -6,7 +6,7 @@ # import #endif // SENTRY_HAS_UIKIT -@class SentryHub; +@class SentryHubInternal; @class SentryDispatchQueueWrapper; @class SentryOptions; @@ -40,7 +40,6 @@ NS_ASSUME_NONNULL_BEGIN + (SentryDispatchQueueWrapper *)dispatchQueueWrapper; + (void)dispatchSyncOnMainQueue:(void (^)(void))block; -+ (SentryHub *)currentHub; + (nullable NSDate *)readTimestampLastInForeground; + (void)deleteTimestampLastInForeground; + (void)storeTimestampLastInForeground:(NSDate *)timestamp; diff --git a/Sources/Sentry/include/SentryEnvelopeHeaderHelper.h b/Sources/Sentry/include/SentryEnvelopeHeaderHelper.h deleted file mode 100644 index 83ce3690fa0..00000000000 --- a/Sources/Sentry/include/SentryEnvelopeHeaderHelper.h +++ /dev/null @@ -1,18 +0,0 @@ -@import Foundation; - -@class SentryIdWrapper; -@class SentryEvent; - -NS_ASSUME_NONNULL_BEGIN - -// This class allows creation of SentryEnvelopeHeader from SentryEvent. We can't do -// this in Swift because SentryEvent is written in ObjC but SentryId is in Swift. -// Once SentryEvent gets converted to Swift we wouldn't need this class because we -// could do it directly in Swift. -@interface SentryEnvelopeHeaderHelper : NSObject - -+ (SentryIdWrapper *)headerIdFromEvent:(SentryEvent *)event; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Sources/Sentry/include/SentryHub+Private.h b/Sources/Sentry/include/SentryHub+Private.h index ee963f788cd..c47e3c07dfc 100644 --- a/Sources/Sentry/include/SentryHub+Private.h +++ b/Sources/Sentry/include/SentryHub+Private.h @@ -23,7 +23,7 @@ NS_ASSUME_NONNULL_BEGIN @end -@interface SentryHub () +@interface SentryHubInternal () @property (nullable, nonatomic, strong) SentrySession *session; @@ -38,7 +38,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)addInstalledIntegration:(id)integration name:(NSString *)name; - (void)removeAllIntegrations; -- (SentryClient *_Nullable)client; +- (SentryClientInternal *_Nullable)client; - (void)captureFatalEvent:(SentryEvent *)event; diff --git a/Sources/Sentry/Public/SentryHub.h b/Sources/Sentry/include/SentryHub.h similarity index 97% rename from Sources/Sentry/Public/SentryHub.h rename to Sources/Sentry/include/SentryHub.h index 3633bd5580d..c211ad2aead 100644 --- a/Sources/Sentry/Public/SentryHub.h +++ b/Sources/Sentry/include/SentryHub.h @@ -8,7 +8,7 @@ #import SENTRY_HEADER(SentrySpanProtocol) @class SentryBreadcrumb; -@class SentryClient; +@class SentryClientInternal; @class SentryEvent; @class SentryFeedback; @class SentryId; @@ -17,10 +17,10 @@ @class SentryUser; NS_ASSUME_NONNULL_BEGIN -@interface SentryHub : NSObject +@interface SentryHubInternal : NSObject SENTRY_NO_INIT -- (instancetype)initWithClient:(SentryClient *_Nullable)client +- (instancetype)initWithClient:(SentryClientInternal *_Nullable)client andScope:(SentryScope *_Nullable)scope; /** @@ -191,7 +191,7 @@ SENTRY_NO_INIT /** * Returns a client if there is a bound client on the Hub. */ -- (SentryClient *_Nullable)getClient; +- (SentryClientInternal *_Nullable)getClient; /** * Returns either the current scope or a new one if it was @c nil . @@ -201,7 +201,7 @@ SENTRY_NO_INIT /** * Binds a different client to the hub. */ -- (void)bindClient:(SentryClient *_Nullable)client; +- (void)bindClient:(SentryClientInternal *_Nullable)client; /** * Checks if integration is activated. diff --git a/Sources/Sentry/include/SentryLaunchProfiling.h b/Sources/Sentry/include/SentryLaunchProfiling.h index 89f01fffa6d..033e7154965 100644 --- a/Sources/Sentry/include/SentryLaunchProfiling.h +++ b/Sources/Sentry/include/SentryLaunchProfiling.h @@ -5,7 +5,7 @@ # import "SentryDefines.h" # import -@class SentryHub; +@class SentryHubInternal; @class SentryId; @class SentryOptions; @class SentryTracerConfiguration; @@ -40,7 +40,7 @@ SENTRY_EXTERN void sentry_startLaunchProfile(void); * @noteIf the hub is nil, the tracer/profile will be discarded. This normally should always have a * valid hub, but tests may not have one and call this with nil instead. */ -SENTRY_EXTERN void sentry_stopAndDiscardLaunchProfileTracer(SentryHub *_Nullable hub); +SENTRY_EXTERN void sentry_stopAndDiscardLaunchProfileTracer(SentryHubInternal *_Nullable hub); /** * Write a file to disk containing profile configuration options. The presence of this file will let diff --git a/Sources/Sentry/include/SentryPrivate.h b/Sources/Sentry/include/SentryPrivate.h index c7505f04756..dee35e6b84b 100644 --- a/Sources/Sentry/include/SentryPrivate.h +++ b/Sources/Sentry/include/SentryPrivate.h @@ -4,6 +4,7 @@ #import "SentryANRStoppedResultInternal.h" #import "SentryANRTrackerInternalDelegate.h" #import "SentryBinaryImageCacheCallbacks.h" +#import "SentryClient+Private.h" #import "SentryConcurrentRateLimitsDictionary.h" #import "SentryCrashBinaryImageCache.h" #import "SentryCrashDynamicLinker.h" @@ -12,7 +13,6 @@ #import "SentryDataCategoryMapper.h" #import "SentryDiscardReasonMapper.h" #import "SentryEnvelopeAttachmentHeader.h" -#import "SentryEnvelopeHeaderHelper.h" #import "SentryEventSwiftHelper.h" #import "SentryHub+Private.h" #import "SentryNSDataUtils.h" diff --git a/Sources/Sentry/include/SentryProfiledTracerConcurrency.h b/Sources/Sentry/include/SentryProfiledTracerConcurrency.h index 2bca1f92d40..cc1d30fbf0c 100644 --- a/Sources/Sentry/include/SentryProfiledTracerConcurrency.h +++ b/Sources/Sentry/include/SentryProfiledTracerConcurrency.h @@ -8,7 +8,7 @@ @class SentryEnvelope; @class SentryEnvelopeItem; -@class SentryHub; +@class SentryHubInternal; @class SentryTransaction; @class SentryDispatchQueueWrapper; @class SentryTracerConfiguration; @@ -30,15 +30,15 @@ SENTRY_EXTERN_C_BEGIN * different from the profiler's internal ID. */ SentryId *_Nullable sentry_startProfilerForTrace(SentryTracerConfiguration *configuration, - SentryHub *_Nullable hub, SentryTransactionContext *transactionContext); + SentryHubInternal *_Nullable hub, SentryTransactionContext *transactionContext); /** * @note Only called for transaction-based profiling or continuous profiling V2 with trace lifecycle * option configured. */ -SENTRY_EXTERN void sentry_stopProfilerDueToFinishedTransaction( - SentryHub *hub, SentryDispatchQueueWrapper *dispatchQueue, SentryTransaction *transaction, - BOOL isProfiling, NSDate *_Nullable traceStartTimestamp, uint64_t startSystemTime +SENTRY_EXTERN void sentry_stopProfilerDueToFinishedTransaction(SentryHubInternal *hub, + SentryDispatchQueueWrapper *dispatchQueue, SentryTransaction *transaction, BOOL isProfiling, + NSDate *_Nullable traceStartTimestamp, uint64_t startSystemTime # if SENTRY_HAS_UIKIT , SentryAppStartMeasurement *appStartMeasurement @@ -55,7 +55,7 @@ void sentry_trackTransactionProfilerForTrace(SentryProfiler *profiler, SentryId * For transactions that will be discarded, clean up the bookkeeping state associated with them to * reclaim the memory they're using. */ -void sentry_discardProfilerCorrelatedToTrace(SentryId *internalTraceId, SentryHub *hub); +void sentry_discardProfilerCorrelatedToTrace(SentryId *internalTraceId, SentryHubInternal *hub); /** * Return the profiler instance associated with the tracer. If it was the last tracer for the diff --git a/Sources/Sentry/include/SentryProfiler+Private.h b/Sources/Sentry/include/SentryProfiler+Private.h index 84027f44a24..daa7b923aad 100644 --- a/Sources/Sentry/include/SentryProfiler+Private.h +++ b/Sources/Sentry/include/SentryProfiler+Private.h @@ -6,7 +6,7 @@ # import "SentryProfilerDefines.h" @class SentryEnvelopeItem; -@class SentryHub; +@class SentryHubInternal; @class SentryId; @class SentryMetricProfiler; @class SentryOptions; @@ -35,7 +35,7 @@ typedef struct { * launch's profiling, stop tracer profiling if no automatic performance transaction is running, * start the continuous profiler if enabled and not profiling from launch. */ -SENTRY_EXTERN void sentry_sdkInitProfilerTasks(SentryOptions *options, SentryHub *hub); +SENTRY_EXTERN void sentry_sdkInitProfilerTasks(SentryOptions *options, SentryHubInternal *hub); SENTRY_EXTERN SentryProfileConfiguration *_Nullable sentry_profileConfiguration; diff --git a/Sources/Sentry/include/SentryProfilerSerialization.h b/Sources/Sentry/include/SentryProfilerSerialization.h index 299a903b7a9..e6de77747c8 100644 --- a/Sources/Sentry/include/SentryProfilerSerialization.h +++ b/Sources/Sentry/include/SentryProfilerSerialization.h @@ -6,7 +6,7 @@ @class SentryEnvelope; @class SentryEnvelopeItem; -@class SentryHub; +@class SentryHubInternal; @class SentryId; @class SentryScreenFrames; @class SentryTransaction; @@ -18,7 +18,7 @@ NS_ASSUME_NONNULL_BEGIN extern "C" { # endif -SENTRY_EXTERN SentryEnvelopeItem *_Nullable sentry_traceProfileEnvelopeItem(SentryHub *hub, +SENTRY_EXTERN SentryEnvelopeItem *_Nullable sentry_traceProfileEnvelopeItem(SentryHubInternal *hub, SentryProfiler *profiler, NSDictionary *profilingData, SentryTransaction *transaction, NSDate *startTimestamp); @@ -32,7 +32,7 @@ SentryEnvelope *_Nullable sentry_continuousProfileChunkEnvelope( /** Alternative affordance for use by PrivateSentrySDKOnly for hybrid SDKs. */ NSMutableDictionary *_Nullable sentry_collectProfileDataHybridSDK( - uint64_t startSystemTime, uint64_t endSystemTime, SentryId *traceId, SentryHub *hub); + uint64_t startSystemTime, uint64_t endSystemTime, SentryId *traceId, SentryHubInternal *hub); # if defined(__cplusplus) } diff --git a/Sources/Sentry/include/SentryProfilingSwiftHelpers.h b/Sources/Sentry/include/SentryProfilingSwiftHelpers.h index 50e5d5555b0..daf4bb23530 100644 --- a/Sources/Sentry/include/SentryProfilingSwiftHelpers.h +++ b/Sources/Sentry/include/SentryProfilingSwiftHelpers.h @@ -4,7 +4,7 @@ @class SentryId; @class SentryProfileOptions; @class SentrySpanId; -@class SentryClient; +@class SentryClientInternal; @class SentryDispatchQueueWrapper; @class SentryScreenFrames; @class SentryTransactionContext; @@ -19,9 +19,9 @@ NS_ASSUME_NONNULL_BEGIN extern "C" { #endif -BOOL sentry_isContinuousProfilingEnabled(SentryClient *client); -BOOL sentry_isProfilingCorrelatedToTraces(SentryClient *client); -SentryProfileOptions *_Nullable sentry_getProfiling(SentryClient *client); +BOOL sentry_isContinuousProfilingEnabled(SentryClientInternal *client); +BOOL sentry_isProfilingCorrelatedToTraces(SentryClientInternal *client); +SentryProfileOptions *_Nullable sentry_getProfiling(SentryClientInternal *client); NSString *sentry_stringFromSentryID(SentryId *sentryID); NSDate *sentry_getDate(void); uint64_t sentry_getSystemTime(void); diff --git a/Sources/Sentry/include/SentrySDK+Private.h b/Sources/Sentry/include/SentrySDK+Private.h index b360f4e9888..13299264e2c 100644 --- a/Sources/Sentry/include/SentrySDK+Private.h +++ b/Sources/Sentry/include/SentrySDK+Private.h @@ -13,8 +13,8 @@ @class SentryAppStartMeasurement; @class SentryEnvelope; @class SentryFeedback; -@class SentryHub; @class SentryId; +@class SentryHubInternal; NS_ASSUME_NONNULL_BEGIN @@ -42,7 +42,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, class) NSUInteger startInvocations; @property (nullable, nonatomic, class) NSDate *startTimestamp; -+ (SentryHub *)currentHub; ++ (SentryHubInternal *)currentHub; /** * The option used to start the SDK diff --git a/Sources/Sentry/include/SentrySDKInternal.h b/Sources/Sentry/include/SentrySDKInternal.h index a0de99e6e0a..20234a0bab4 100644 --- a/Sources/Sentry/include/SentrySDKInternal.h +++ b/Sources/Sentry/include/SentrySDKInternal.h @@ -25,14 +25,6 @@ NS_ASSUME_NONNULL_BEGIN -@interface SentryIdWrapper : NSObject - -@property (nonatomic, strong) NSString *sentryIdString; - -- (instancetype)initWithId:(NSString *)sentryIdString; - -@end - /** * The internal implementation of SentrySDK. * This class is used internally by the Swift wrapper. @@ -82,7 +74,7 @@ SENTRY_NO_INIT * @return The @c SentryId of the event or @c SentryId.empty if the event is not sent. * */ -+ (SentryIdWrapper *)captureEvent:(SentryEvent *)event NS_SWIFT_NAME(capture(event:)); ++ (SentryId *)captureEvent:(SentryEvent *)event NS_SWIFT_NAME(capture(event:)); /** * Captures a manually created event and sends it to Sentry. Only the data in this scope object will @@ -92,8 +84,8 @@ SENTRY_NO_INIT * @return The @c SentryId of the event or @c SentryId.empty if the event is not sent. * */ -+ (SentryIdWrapper *)captureEvent:(SentryEvent *)event - withScope:(SentryScope *)scope NS_SWIFT_NAME(capture(event:scope:)); ++ (SentryId *)captureEvent:(SentryEvent *)event + withScope:(SentryScope *)scope NS_SWIFT_NAME(capture(event:scope:)); /** * Captures a manually created event and sends it to Sentry. Maintains the global scope but mutates @@ -103,9 +95,8 @@ SENTRY_NO_INIT * @return The @c SentryId of the event or @c SentryId.empty if the event is not sent. * */ -+ (SentryIdWrapper *)captureEvent:(SentryEvent *)event - withScopeBlock:(void (^)(SentryScope *scope))block - NS_SWIFT_NAME(capture(event:block:)); ++ (SentryId *)captureEvent:(SentryEvent *)event + withScopeBlock:(void (^)(SentryScope *scope))block NS_SWIFT_NAME(capture(event:block:)); /** * Creates a transaction, binds it to the hub and returns the instance. @@ -175,7 +166,7 @@ SENTRY_NO_INIT * @return The @c SentryId of the event or @c SentryId.empty if the event is not sent. * */ -+ (SentryIdWrapper *)captureError:(NSError *)error NS_SWIFT_NAME(capture(error:)); ++ (SentryId *)captureError:(NSError *)error NS_SWIFT_NAME(capture(error:)); /** * Captures an error event and sends it to Sentry. Only the data in this scope object will be added @@ -185,8 +176,8 @@ SENTRY_NO_INIT * @return The @c SentryId of the event or @c SentryId.empty if the event is not sent. * */ -+ (SentryIdWrapper *)captureError:(NSError *)error - withScope:(SentryScope *)scope NS_SWIFT_NAME(capture(error:scope:)); ++ (SentryId *)captureError:(NSError *)error + withScope:(SentryScope *)scope NS_SWIFT_NAME(capture(error:scope:)); /** * Captures an error event and sends it to Sentry. Maintains the global scope but mutates scope data @@ -196,9 +187,8 @@ SENTRY_NO_INIT * @return The @c SentryId of the event or @c SentryId.empty if the event is not sent. * */ -+ (SentryIdWrapper *)captureError:(NSError *)error - withScopeBlock:(void (^)(SentryScope *scope))block - NS_SWIFT_NAME(capture(error:block:)); ++ (SentryId *)captureError:(NSError *)error + withScopeBlock:(void (^)(SentryScope *scope))block NS_SWIFT_NAME(capture(error:block:)); /** * Captures an exception event and sends it to Sentry. @@ -206,7 +196,7 @@ SENTRY_NO_INIT * @return The @c SentryId of the event or @c SentryId.empty if the event is not sent. * */ -+ (SentryIdWrapper *)captureException:(NSException *)exception NS_SWIFT_NAME(capture(exception:)); ++ (SentryId *)captureException:(NSException *)exception NS_SWIFT_NAME(capture(exception:)); /** * Captures an exception event and sends it to Sentry. Only the data in this scope object will be @@ -216,8 +206,8 @@ SENTRY_NO_INIT * @return The @c SentryId of the event or @c SentryId.empty if the event is not sent. * */ -+ (SentryIdWrapper *)captureException:(NSException *)exception - withScope:(SentryScope *)scope NS_SWIFT_NAME(capture(exception:scope:)); ++ (SentryId *)captureException:(NSException *)exception + withScope:(SentryScope *)scope NS_SWIFT_NAME(capture(exception:scope:)); /** * Captures an exception event and sends it to Sentry. Maintains the global scope but mutates scope @@ -227,8 +217,8 @@ SENTRY_NO_INIT * @return The @c SentryId of the event or @c SentryId.empty if the event is not sent. * */ -+ (SentryIdWrapper *)captureException:(NSException *)exception - withScopeBlock:(void (^)(SentryScope *scope))block ++ (SentryId *)captureException:(NSException *)exception + withScopeBlock:(void (^)(SentryScope *scope))block NS_SWIFT_NAME(capture(exception:block:)); /** @@ -237,7 +227,7 @@ SENTRY_NO_INIT * @return The @c SentryId of the event or @c SentryId.empty if the event is not sent. * */ -+ (SentryIdWrapper *)captureMessage:(NSString *)message NS_SWIFT_NAME(capture(message:)); ++ (SentryId *)captureMessage:(NSString *)message NS_SWIFT_NAME(capture(message:)); /** * Captures a message event and sends it to Sentry. Only the data in this scope object will be added @@ -247,8 +237,8 @@ SENTRY_NO_INIT * @return The @c SentryId of the event or @c SentryId.empty if the event is not sent. * */ -+ (SentryIdWrapper *)captureMessage:(NSString *)message - withScope:(SentryScope *)scope NS_SWIFT_NAME(capture(message:scope:)); ++ (SentryId *)captureMessage:(NSString *)message + withScope:(SentryScope *)scope NS_SWIFT_NAME(capture(message:scope:)); /** * Captures a message event and sends it to Sentry. Maintains the global scope but mutates scope @@ -258,8 +248,8 @@ SENTRY_NO_INIT * @return The @c SentryId of the event or @c SentryId.empty if the event is not sent. * */ -+ (SentryIdWrapper *)captureMessage:(NSString *)message - withScopeBlock:(void (^)(SentryScope *scope))block ++ (SentryId *)captureMessage:(NSString *)message + withScopeBlock:(void (^)(SentryScope *scope))block NS_SWIFT_NAME(capture(message:block:)); + (void)captureSerializedFeedback:(NSDictionary *)serializedFeedback diff --git a/Sources/Sentry/include/SentryTracer+Private.h b/Sources/Sentry/include/SentryTracer+Private.h index 282954da506..513d23f31b0 100644 --- a/Sources/Sentry/include/SentryTracer+Private.h +++ b/Sources/Sentry/include/SentryTracer+Private.h @@ -2,7 +2,7 @@ @interface SentryTracer () -@property (nonatomic, strong) SentryHub *hub; +@property (nonatomic, strong) SentryHubInternal *hub; /** * We need an immutable identifier to e.g. track concurrent tracers against a static profiler where diff --git a/Sources/Sentry/include/SentryTracer.h b/Sources/Sentry/include/SentryTracer.h index a80f1eaa2df..48bd8806557 100644 --- a/Sources/Sentry/include/SentryTracer.h +++ b/Sources/Sentry/include/SentryTracer.h @@ -5,7 +5,7 @@ NS_ASSUME_NONNULL_BEGIN @class SentryDispatchQueueWrapper; -@class SentryHub; +@class SentryHubInternal; @class SentryMeasurementValue; @class SentryTraceContext; @class SentryTraceHeader; @@ -60,7 +60,7 @@ static const NSTimeInterval SENTRY_AUTO_TRANSACTION_MAX_DURATION = 500.0; * @param hub A hub to bind this transaction */ - (instancetype)initWithTransactionContext:(SentryTransactionContext *)transactionContext - hub:(nullable SentryHub *)hub; + hub:(nullable SentryHubInternal *)hub; /** * Init a SentryTracer with given transaction context and hub and set other fields by default @@ -72,7 +72,7 @@ static const NSTimeInterval SENTRY_AUTO_TRANSACTION_MAX_DURATION = 500.0; * @return SentryTracer */ - (instancetype)initWithTransactionContext:(SentryTransactionContext *)transactionContext - hub:(nullable SentryHub *)hub + hub:(nullable SentryHubInternal *)hub configuration:(SentryTracerConfiguration *)configuration; - (id)startChildWithParentId:(SentrySpanId *)parentId diff --git a/Sources/Sentry/include/SentryUserAccess.h b/Sources/Sentry/include/SentryUserAccess.h index 1919360dcf2..ca66b5afedd 100644 --- a/Sources/Sentry/include/SentryUserAccess.h +++ b/Sources/Sentry/include/SentryUserAccess.h @@ -3,7 +3,6 @@ #import -@class SentryClient; @class SentryUser; NS_ASSUME_NONNULL_BEGIN diff --git a/Sources/SentrySwiftUI/SentryInternal/SentryInternal.h b/Sources/SentrySwiftUI/SentryInternal/SentryInternal.h index c490316331e..523f6ba185d 100644 --- a/Sources/SentrySwiftUI/SentryInternal/SentryInternal.h +++ b/Sources/SentrySwiftUI/SentryInternal/SentryInternal.h @@ -125,6 +125,8 @@ typedef NS_ENUM(NSUInteger, SentrySpanStatus); @end +@class SentryHubInternal; + #if __has_include("SentrySDKInternal.h") @interface SentrySDKInternal () #else @@ -132,7 +134,7 @@ typedef NS_ENUM(NSUInteger, SentrySpanStatus); #endif @property (nonatomic, nullable, readonly, class) SentryOptions *options; -+ (void)setCurrentHub:(nullable SentryHub *)hub; ++ (void)setCurrentHub:(nullable SentryHubInternal *)hub; + (void)setStartOptions:(nullable SentryOptions *)options NS_SWIFT_NAME(setStart(with:)); @end diff --git a/Sources/Swift/Core/Protocol/SentryId.swift b/Sources/Swift/Core/Protocol/SentryId.swift deleted file mode 100644 index 54de1d2da7a..00000000000 --- a/Sources/Swift/Core/Protocol/SentryId.swift +++ /dev/null @@ -1,77 +0,0 @@ -import Foundation - -@objcMembers -final public class SentryId: NSObject, Sendable { - - /** - * A @c SentryId with an empty UUID "00000000000000000000000000000000". - */ - public static let empty = SentryId(uuidString: "00000000-0000-0000-0000-000000000000") - - /** - * Returns a 32 lowercase character hexadecimal string description of the @c SentryId, such as - * "12c2d058d58442709aa2eca08bf20986". - */ - public var sentryIdString: String { - return id.uuidString.replacingOccurrences(of: "-", with: "").lowercased() - } - - private let id: UUID - - /** - * Creates a @c SentryId with a random UUID. - */ - public override init() { - id = UUID() - } - - /** - * Creates a SentryId with the given UUID. - */ - public init(uuid: UUID) { - id = uuid - } - - /** - * Creates a @c SentryId from a 32 character hexadecimal string without dashes such as - * "12c2d058d58442709aa2eca08bf20986" or a 36 character hexadecimal string such as such as - * "12c2d058-d584-4270-9aa2-eca08bf20986". - * @return SentryId.empty for invalid strings. - */ - @objc(initWithUUIDString:) - public init(uuidString: String) { - if let id = UUID(uuidString: uuidString) { - self.id = id - return - } - - if uuidString.count == 32 { - let dashedUUID = uuidString.enumerated().reduce(into: [Character]()) { partialResult, next in - if next.offset == 8 || next.offset == 12 || next.offset == 16 || next.offset == 20 { - partialResult.append("-") - } - partialResult.append(next.element) - } - if let id = UUID(uuidString: String(dashedUUID)) { - self.id = id - return - } - } - - //The string conversion will not fail, but I'm using null coalescing to quiet swiftlint that don't let us use force unwrap. - self.id = UUID(uuidString: "00000000-0000-0000-0000-000000000000") ?? UUID() - } - - override public func isEqual(_ object: Any?) -> Bool { - guard let other = object as? SentryId else { return false } - return other.id == self.id - } - - override public var description: String { - sentryIdString - } - - override public var hash: Int { - id.hashValue - } -} diff --git a/Sources/Swift/Helper/SentrySDK.swift b/Sources/Swift/Helper/SentrySDK.swift index 55910724f5a..4c3c500401c 100644 --- a/Sources/Swift/Helper/SentrySDK.swift +++ b/Sources/Swift/Helper/SentrySDK.swift @@ -35,7 +35,7 @@ import Foundation if let _logger, _loggerConfigured { return _logger } - let hub = SentryDependencyContainerSwiftHelper.currentHub() + let hub = SentrySDKInternal.currentHub() var batcher: SentryLogBatcher? if let client = hub.getClient(), client.options.enableLogs { batcher = SentryLogBatcher(client: client, dispatchQueue: Dependencies.dispatchQueueWrapper) @@ -74,7 +74,7 @@ import Foundation /// - returns: The `SentryId` of the event or `SentryId.empty` if the event is not sent. @objc(captureEvent:) @discardableResult public static func capture(event: Event) -> SentryId { - return SentrySDKInternal.capture(event: event).sentryId + return SentrySDKInternal.capture(event: event) } /// Captures a manually created event and sends it to Sentry. Only the data in this scope object will @@ -84,7 +84,7 @@ import Foundation /// - returns: The `SentryId` of the event or `SentryId.empty` if the event is not sent. @objc(captureEvent:withScope:) @discardableResult public static func capture(event: Event, scope: Scope) -> SentryId { - return SentrySDKInternal.capture(event: event, scope: scope).sentryId + return SentrySDKInternal.capture(event: event, scope: scope) } /// Captures a manually created event and sends it to Sentry. Maintains the global scope but mutates @@ -94,7 +94,7 @@ import Foundation /// - returns: The `SentryId` of the event or `SentryId.empty` if the event is not sent. @objc(captureEvent:withScopeBlock:) @discardableResult public static func capture(event: Event, block: @escaping (Scope) -> Void) -> SentryId { - return SentrySDKInternal.capture(event: event, block: block).sentryId + return SentrySDKInternal.capture(event: event, block: block) } // MARK: - Transaction Management @@ -159,7 +159,7 @@ import Foundation /// - returns: The `SentryId` of the event or `SentryId.empty` if the event is not sent. @objc(captureError:) @discardableResult public static func capture(error: Error) -> SentryId { - return SentrySDKInternal.capture(error: error).sentryId + return SentrySDKInternal.capture(error: error) } /// Captures an error event and sends it to Sentry. Only the data in this scope object will be added @@ -169,7 +169,7 @@ import Foundation /// - returns: The `SentryId` of the event or `SentryId.empty` if the event is not sent. @objc(captureError:withScope:) @discardableResult public static func capture(error: Error, scope: Scope) -> SentryId { - return SentrySDKInternal.capture(error: error, scope: scope).sentryId + return SentrySDKInternal.capture(error: error, scope: scope) } /// Captures an error event and sends it to Sentry. Maintains the global scope but mutates scope data @@ -179,7 +179,7 @@ import Foundation /// - returns: The `SentryId` of the event or `SentryId.empty` if the event is not sent. @objc(captureError:withScopeBlock:) @discardableResult public static func capture(error: Error, block: @escaping (Scope) -> Void) -> SentryId { - return SentrySDKInternal.capture(error: error, block: block).sentryId + return SentrySDKInternal.capture(error: error, block: block) } // MARK: - Exception Capture @@ -189,7 +189,7 @@ import Foundation /// - returns: The `SentryId` of the event or `SentryId.empty` if the event is not sent. @objc(captureException:) @discardableResult public static func capture(exception: NSException) -> SentryId { - return SentrySDKInternal.capture(exception: exception).sentryId + return SentrySDKInternal.capture(exception: exception) } /// Captures an exception event and sends it to Sentry. Only the data in this scope object will be @@ -199,7 +199,7 @@ import Foundation /// - returns: The `SentryId` of the event or `SentryId.empty` if the event is not sent. @objc(captureException:withScope:) @discardableResult public static func capture(exception: NSException, scope: Scope) -> SentryId { - return SentrySDKInternal.capture(exception: exception, scope: scope).sentryId + return SentrySDKInternal.capture(exception: exception, scope: scope) } /// Captures an exception event and sends it to Sentry. Maintains the global scope but mutates scope @@ -209,7 +209,7 @@ import Foundation /// - returns: The `SentryId` of the event or `SentryId.empty` if the event is not sent. @objc(captureException:withScopeBlock:) @discardableResult public static func capture(exception: NSException, block: @escaping (Scope) -> Void) -> SentryId { - return SentrySDKInternal.capture(exception: exception, block: block).sentryId + return SentrySDKInternal.capture(exception: exception, block: block) } // MARK: - Message Capture @@ -219,7 +219,7 @@ import Foundation /// - returns: The `SentryId` of the event or `SentryId.empty` if the event is not sent. @objc(captureMessage:) @discardableResult public static func capture(message: String) -> SentryId { - return SentrySDKInternal.capture(message: message).sentryId + return SentrySDKInternal.capture(message: message) } /// Captures a message event and sends it to Sentry. Only the data in this scope object will be added @@ -229,7 +229,7 @@ import Foundation /// - returns: The `SentryId` of the event or `SentryId.empty` if the event is not sent. @objc(captureMessage:withScope:) @discardableResult public static func capture(message: String, scope: Scope) -> SentryId { - return SentrySDKInternal.capture(message: message, scope: scope).sentryId + return SentrySDKInternal.capture(message: message, scope: scope) } /// Captures a message event and sends it to Sentry. Maintains the global scope but mutates scope @@ -239,7 +239,7 @@ import Foundation /// - returns: The `SentryId` of the event or `SentryId.empty` if the event is not sent. @objc(captureMessage:withScopeBlock:) @discardableResult public static func capture(message: String, block: @escaping (Scope) -> Void) -> SentryId { - return SentrySDKInternal.capture(message: message, block: block).sentryId + return SentrySDKInternal.capture(message: message, block: block) } /// Captures user feedback that was manually gathered and sends it to Sentry. @@ -440,10 +440,4 @@ import Foundation } } -extension SentryIdWrapper { - var sentryId: SentryId { - SentryId(uuidString: sentryIdString) - } -} - // swiftlint:enable file_length diff --git a/Sources/Swift/Integrations/Session/SessionTracker.swift b/Sources/Swift/Integrations/Session/SessionTracker.swift index 4eaf00d66e6..87ebce7145a 100644 --- a/Sources/Swift/Integrations/Session/SessionTracker.swift +++ b/Sources/Swift/Integrations/Session/SessionTracker.swift @@ -74,7 +74,7 @@ typealias Application = NSApplication } @objc public func stop() { - SentryDependencyContainerSwiftHelper.currentHub().endSession() + SentrySDKInternal.currentHub().endSession() removeObservers() @@ -113,7 +113,7 @@ typealias Application = NSApplication SentryDependencyContainerSwiftHelper.deleteTimestampLastInForeground() } - let hub = SentryDependencyContainerSwiftHelper.currentHub() + let hub = SentrySDKInternal.currentHub() hub.closeCachedSession(withTimestamp: lastInForeground) } @@ -148,7 +148,7 @@ typealias Application = NSApplication return } - let hub = SentryDependencyContainerSwiftHelper.currentHub() + let hub = SentrySDKInternal.currentHub() let lastInForeground = SentryDependencyContainerSwiftHelper.readTimestampLastInForeground() if let lastInForeground { @@ -199,7 +199,7 @@ typealias Application = NSApplication @objc func willTerminate() { let lastInForeground = lastInForegroundLock.synchronized { return self.lastInForeground } let sessionEnded = lastInForeground ?? dateProvider.date() - SentryDependencyContainerSwiftHelper.currentHub().endSession(withTimestamp: sessionEnded) + SentrySDKInternal.currentHub().endSession(withTimestamp: sessionEnded) SentryDependencyContainerSwiftHelper.deleteTimestampLastInForeground() wasStartSessionCalled = false } diff --git a/Sources/Swift/SentryClient.swift b/Sources/Swift/SentryClient.swift new file mode 100644 index 00000000000..05824f5fa7e --- /dev/null +++ b/Sources/Swift/SentryClient.swift @@ -0,0 +1,138 @@ +@_implementationOnly import _SentryPrivate +import Foundation + +@objc public final class SentryClient: NSObject { + let helper: SentryClientInternal + + /** + * Initializes a @c SentryClient. Pass in a dictionary of options. + * @param options Options dictionary + * @return An initialized @c SentryClient or @c nil if an error occurred. + */ + @objc public init?(options: Options) { + guard let helper = SentryClientInternal(options: options) else { + return nil + } + self.helper = helper + } + + init(helper: SentryClientInternal) { + self.helper = helper + } + + @objc public var isEnabled: Bool { + helper.isEnabled + } + + @objc public var options: Options { + get { helper.options } + set { helper.options = newValue } + } + + /** + * Captures a manually created event and sends it to Sentry. + * @param event The event to send to Sentry. + * @return The @c SentryId of the event or @c SentryId.empty if the event is not sent. + */ + @discardableResult @objc(captureEvent:) public func capture(event: Event) -> SentryId { + helper.capture(event: event) + } + + /** + * Captures a manually created event and sends it to Sentry. + * @param event The event to send to Sentry. + * @param scope The scope containing event metadata. + * @return The @c SentryId of the event or @c SentryId.empty if the event is not sent. + */ + @discardableResult @objc(captureEvent:withScope:) public func capture(event: Event, scope: Scope) -> SentryId { + helper.capture(event: event, scope: scope) + } + + /** + * Captures an error event and sends it to Sentry. + * @param error The error to send to Sentry. + * @return The @c SentryId of the event or @c SentryId.empty if the event is not sent. + */ + @discardableResult @objc(captureError:) public func capture(error: Error) -> SentryId { + helper.capture(error: error) + } + + /** + * Captures an error event and sends it to Sentry. + * @param error The error to send to Sentry. + * @param scope The scope containing event metadata. + * @return The @c SentryId of the event or @c SentryId.empty if the event is not sent. + */ + @discardableResult @objc(captureError:withScope:) public func capture(error: Error, scope: Scope) -> SentryId { + helper.capture(error: error, scope: scope) + } + + /** + * Captures an exception event and sends it to Sentry. + * @param exception The exception to send to Sentry. + * @return The @c SentryId of the event or @c SentryId.empty if the event is not sent. + */ + @discardableResult @objc(captureException:) public func capture(exception: NSException) -> SentryId { + helper.capture(exception: exception) + } + + /** + * Captures an exception event and sends it to Sentry. + * @param exception The exception to send to Sentry. + * @param scope The scope containing event metadata. + * @return The @c SentryId of the event or @c SentryId.empty if the event is not sent. + */ + @discardableResult @objc(captureException:withScope:) public func capture(exception: NSException, scope: Scope) -> SentryId { + helper.capture(exception: exception, scope: scope) + } + + /** + * Captures a message event and sends it to Sentry. + * @param message The message to send to Sentry. + * @return The @c SentryId of the event or @c SentryId.empty if the event is not sent. + */ + @discardableResult @objc(captureMessage:) public func capture(message: String) -> SentryId { + helper.capture(message: message) + } + + /** + * Captures a message event and sends it to Sentry. + * @param message The message to send to Sentry. + * @param scope The scope containing event metadata. + * @return The @c SentryId of the event or @c SentryId.empty if the event is not sent. + */ + @discardableResult @objc(captureMessage:withScope:) public func capture(message: String, scope: Scope) -> SentryId { + helper.capture(message: message, scope: scope) + } + + /** + * Captures a new-style user feedback and sends it to Sentry. + * @param feedback The user feedback to send to Sentry. + * @param scope The current scope from which to gather contextual information. + */ + @objc(captureFeedback:withScope:) public func capture(feedback: SentryFeedback, scope: Scope) { + helper.captureSerializedFeedback( + feedback.serialize(), + withEventId: feedback.eventId.sentryIdString, + attachments: feedback.attachmentsForEnvelope(), + scope: scope) + } + + /** + * Waits synchronously for the SDK to flush out all queued and cached items for up to the specified + * timeout in seconds. If there is no internet connection, the function returns immediately. The SDK + * doesn't dispose the client or the hub. + * @param timeout The time to wait for the SDK to complete the flush. + */ + @objc(flush:) public func flush(timeout: TimeInterval) { + helper.flush(timeout: timeout) + } + + /** + * Disables the client and calls flush with @c SentryOptions.shutdownTimeInterval . + */ + @objc public func close() { + helper.close() + } + +} diff --git a/Sources/Swift/SentryCrash/SentryThreadInspector.swift b/Sources/Swift/SentryCrash/SentryThreadInspector.swift index b0eaf55764b..2dd6c5aae97 100644 --- a/Sources/Swift/SentryCrash/SentryThreadInspector.swift +++ b/Sources/Swift/SentryCrash/SentryThreadInspector.swift @@ -19,6 +19,10 @@ internalHelper.getCurrentThreadsWithStackTrace() } + @objc public func getCurrentThreads() -> [SentryThread] { + internalHelper.getCurrentThreads() + } + @objc public func getThreadName(_ thread: UInt) -> String? { internalHelper.getThreadName(thread) } diff --git a/Sources/Swift/SentryHub.swift b/Sources/Swift/SentryHub.swift new file mode 100644 index 00000000000..990af0569d4 --- /dev/null +++ b/Sources/Swift/SentryHub.swift @@ -0,0 +1,293 @@ +@_implementationOnly import _SentryPrivate +import Foundation + +@objc public final class SentryHub: NSObject { + private let helper: SentryHubInternal + @objc(initWithClient:andScope:) public init(client: SentryClient?, andScope scope: Scope?) { + helper = SentryHubInternal(client: client?.helper, andScope: scope) + } + + /** + * Starts a new SentrySession. If there's a running SentrySession, it ends it before starting the + * new one. You can use this method in combination with endSession to manually track SentrySessions. + * The SDK uses SentrySession to inform Sentry about release and project associated project health. + */ + @objc public func startSession() { + helper.startSession() + } + + /** + * Ends the current SentrySession. You can use this method in combination with startSession to + * manually track SentrySessions. The SDK uses SentrySession to inform Sentry about release and + * project associated project health. + */ + @objc public func endSession() { + helper.endSession() + } + + /** + * Ends the current session with the given timestamp. + * @param timestamp The timestamp to end the session with. + */ + @objc public func endSession(withTimestamp timestamp: Date) { + helper.endSession(withTimestamp: timestamp) + } + + /** + * Captures a manually created event and sends it to Sentry. + * @param event The event to send to Sentry. + * @return The SentryId of the event or SentryId.empty if the event is not sent. + */ + @discardableResult @objc(captureEvent:) public func capture(event: Event) -> SentryId { + helper.capture(event: event) + } + + /** + * Captures a manually created event and sends it to Sentry. + * @param event The event to send to Sentry. + * @param scope The scope containing event metadata. + * @return The SentryId of the event or SentryId.empty if the event is not sent. + */ + @discardableResult @objc(captureEvent:withScope:) public func capture(event: Event, scope: Scope) -> SentryId { + helper.capture(event: event, scope: scope) + } + + /** + * Creates a transaction, binds it to the hub and returns the instance. + * @param name The transaction name. + * @param operation Short code identifying the type of operation the span is measuring. + * @return The created transaction. + */ + @discardableResult @objc public func startTransaction(name: String, operation: String) -> Span { + helper.startTransaction(name: name, operation: operation) + } + + /** + * Creates a transaction, binds it to the hub and returns the instance. + * @param name The transaction name. + * @param operation Short code identifying the type of operation the span is measuring. + * @param bindToScope Indicates whether the SDK should bind the new transaction to the scope. + * @return The created transaction. + */ + @discardableResult @objc public func startTransaction(name: String, operation: String, bindToScope: Bool) -> Span { + helper.startTransaction(name: name, operation: operation, bindToScope: bindToScope) + } + + /** + * Creates a transaction, binds it to the hub and returns the instance. + * @param transactionContext The transaction context. + * @return The created transaction. + */ + @discardableResult @objc(startTransactionWithContext:) public func startTransaction(transactionContext: TransactionContext) -> Span { + helper.startTransaction(transactionContext: transactionContext) + } + + /** + * Creates a transaction, binds it to the hub and returns the instance. + * @param transactionContext The transaction context. + * @param bindToScope Indicates whether the SDK should bind the new transaction to the scope. + * @return The created transaction. + */ + @discardableResult @objc(startTransactionWithContext:bindToScope:) public func startTransaction(transactionContext: TransactionContext, bindToScope: Bool) -> Span { + return helper.startTransaction(transactionContext: transactionContext, bindToScope: bindToScope) + } + + /** + * Creates a transaction, binds it to the hub and returns the instance. + * @param transactionContext The transaction context. + * @param bindToScope Indicates whether the SDK should bind the new transaction to the scope. + * @param customSamplingContext Additional information about the sampling context. + * @return The created transaction. + */ + @discardableResult @objc(startTransactionWithContext:bindToScope:customSamplingContext:) public func startTransaction( + transactionContext: TransactionContext, + bindToScope: Bool, + customSamplingContext: [String: Any] + ) -> Span { + return helper.startTransaction( + transactionContext: transactionContext, + bindToScope: bindToScope, + customSamplingContext: customSamplingContext + ) + } + + /** + * Creates a transaction, binds it to the hub and returns the instance. + * @param transactionContext The transaction context. + * @param customSamplingContext Additional information about the sampling context. + * @return The created transaction. + */ + @discardableResult @objc(startTransactionWithContext:customSamplingContext:) public func startTransaction( + transactionContext: TransactionContext, + customSamplingContext: [String: Any] + ) -> Span { + return startTransaction(transactionContext: transactionContext, bindToScope: true, customSamplingContext: customSamplingContext) + } + + /** + * Captures an error event and sends it to Sentry. + * @param error The error to send to Sentry. + * @return The @c SentryId of the event or @c SentryId.empty if the event is not sent. + */ + @discardableResult @objc(captureError:) public func capture(error: NSError) -> SentryId { + helper.capture(error: error) + } + + /** + * Captures an error event and sends it to Sentry. + * @param error The error to send to Sentry. + * @param scope The scope containing event metadata. + * @return The @c SentryId of the event or @c SentryId.empty if the event is not sent. + */ + @discardableResult @objc(captureError:withScope:) public func capture(error: Error, scope: Scope) -> SentryId { + helper.capture(error: error, scope: scope) + } + + /** + * Captures an exception event and sends it to Sentry. + * @param exception The exception to send to Sentry. + * @return The @c SentryId of the event or @c SentryId.empty if the event is not sent. + */ + @discardableResult @objc(captureException:) public func capture(exception: NSException) -> SentryId { + helper.capture(exception: exception) + } + + /** + * Captures an exception event and sends it to Sentry. + * @param exception The exception to send to Sentry. + * @param scope The scope containing event metadata. + * @return The @c SentryId of the event or @c SentryId.empty if the event is not sent. + */ + @discardableResult @objc(captureException:withScope:) public func capture(exception: NSException, scope: Scope) -> SentryId { + helper.capture(exception: exception, scope: scope) + } + + /** + * Captures a message event and sends it to Sentry. + * @param message The message to send to Sentry. + * @return The @c SentryId of the event or @c SentryId.empty if the event is not sent. + */ + @discardableResult @objc(captureMessage:) public func capture(message: String) -> SentryId { + helper.capture(message: message) + } + + /** + * Captures a message event and sends it to Sentry. + * @param message The message to send to Sentry. + * @param scope The scope containing event metadata. + * @return The @c SentryId of the event or @c SentryId.empty if the event is not sent. + */ + @discardableResult @objc(captureMessage:withScope:) public func capture(message: String, scope: Scope) -> SentryId { + helper.capture(message: message, scope: scope) + } + + /** + * Captures a new-style user feedback and sends it to Sentry. + * @param feedback The user feedback to send to Sentry. + */ + @objc(captureFeedback:) public func capture(feedback: SentryFeedback) { + helper.captureSerializedFeedback( + feedback.serialize(), + withEventId: feedback.eventId.sentryIdString, + attachments: feedback.attachmentsForEnvelope()) + } + + /** + * Use this method to modify the Scope of the Hub. The SDK uses the Scope to attach + * contextual data to events. + * @param callback The callback for configuring the Scope of the Hub. + */ + @objc public func configureScope(_ callback: @escaping (Scope) -> Void) { + helper.configureScope(callback) + } + + /** + * Adds a breadcrumb to the Scope of the Hub. + * @param crumb The Breadcrumb to add to the Scope of the Hub. + */ + @objc(addBreadcrumb:) public func add(_ crumb: Breadcrumb) { + helper.add(crumb) + } + + /** + * Returns a client if there is a bound client on the Hub. + */ + @objc public func getClient() -> SentryClient? { + if let client = self.helper.getClient() { + return SentryClient(helper: client) + } + return nil + } + + /** + * Returns either the current scope or a new one if it was @c nil . + */ + @objc public var scope: Scope { + helper.scope + } + + /** + * Binds a different client to the hub. + */ + @objc public func bindClient(_ client: SentryClient?) { + helper.bindClient(client?.helper) + } + + /** + * Checks if integration is activated. + */ + @objc public func hasIntegration(_ integrationName: String) -> Bool { + helper.hasIntegration(integrationName) + } + + /** + * Checks if a specific Integration (@c integrationClass) has been installed. + * @return @c YES if instance of @c integrationClass exists within + * @c SentryHub.installedIntegrations + */ + @objc public func isIntegrationInstalled(_ integrationClass: AnyClass) -> Bool { + helper.isIntegrationInstalled(integrationClass) + } + + /** + * Set user to the Scope of the Hub. + * @param user The user to set to the Scope. + */ + @objc public func setUser(_ user: User?) { + helper.setUser(user) + } + + /** + * Reports to the ongoing UIViewController transaction + * that the screen contents are fully loaded and displayed, + * which will create a new span. + */ + @objc public func reportFullyDisplayed() { + helper.reportFullyDisplayed() + } + + /** + * Waits synchronously for the SDK to flush out all queued and cached items for up to the specified + * timeout in seconds. If there is no internet connection, the function returns immediately. The SDK + * doesn't dispose the client or the hub. + * @param timeout The time to wait for the SDK to complete the flush. + */ + @objc(flush:) public func flush(timeout: TimeInterval) { + helper.flush(timeout: timeout) + } + + /** + * Calls flush with @c SentryOptions/shutdownTimeInterval . + */ + @objc public func close() { + helper.close() + } + + // MARK: Internal + + #if (os(iOS) || os(tvOS)) && !SENTRY_NO_UIKIT + func getSessionReplayId() -> String? { + helper.getSessionReplayId() + } + #endif +} diff --git a/Sources/Swift/Tools/SentryEnvelope.swift b/Sources/Swift/Tools/SentryEnvelope.swift index 584e3ebfc3f..080e842a4a6 100644 --- a/Sources/Swift/Tools/SentryEnvelope.swift +++ b/Sources/Swift/Tools/SentryEnvelope.swift @@ -31,8 +31,7 @@ convenience init(event: Event) { let item = SentryEnvelopeItem(event: event) - let headerId = SentryEnvelopeHeaderHelper.headerId(from: event) - self.init(header: SentryEnvelopeHeader(id: headerId.sentryId), singleItem: item) + self.init(header: SentryEnvelopeHeader(id: event.eventId), singleItem: item) } @objc public let header: SentryEnvelopeHeader diff --git a/Sources/Swift/Tools/SentryLogBatcher.swift b/Sources/Swift/Tools/SentryLogBatcher.swift index 09055b30a92..2393273c625 100644 --- a/Sources/Swift/Tools/SentryLogBatcher.swift +++ b/Sources/Swift/Tools/SentryLogBatcher.swift @@ -5,7 +5,7 @@ import Foundation @objcMembers @_spi(Private) public class SentryLogBatcher: NSObject { - private let client: SentryClient + private let client: SentryClientInternal private let flushTimeout: TimeInterval private let maxBufferSizeBytes: Int private let dispatchQueue: SentryDispatchQueueWrapper @@ -28,10 +28,10 @@ import Foundation /// /// - Important: The `dispatchQueue` parameter MUST be a serial queue to ensure thread safety. /// Passing a concurrent queue will result in undefined behavior and potential data races. - @_spi(Private) public init( - client: SentryClient, - flushTimeout: TimeInterval, - maxBufferSizeBytes: Int, + init( + client: SentryClientInternal, + flushTimeout: TimeInterval = 5, + maxBufferSizeBytes: Int = 1_024 * 1_024, dispatchQueue: SentryDispatchQueueWrapper ) { self.client = client @@ -42,22 +42,6 @@ import Foundation super.init() } - /// Convenience initializer with default flush timeout and buffer size. - /// - Parameters: - /// - client: The SentryClient to use for sending logs - /// - dispatchQueue: A **serial** dispatch queue wrapper for thread-safe access to mutable state - /// - /// - Important: The `dispatchQueue` parameter MUST be a serial queue to ensure thread safety. - /// Passing a concurrent queue will result in undefined behavior and potential data races. - @_spi(Private) public convenience init(client: SentryClient, dispatchQueue: SentryDispatchQueueWrapper) { - self.init( - client: client, - flushTimeout: 5, - maxBufferSizeBytes: 1_024 * 1_024, // 1MB - dispatchQueue: dispatchQueue - ) - } - @_spi(Private) func add(_ log: SentryLog) { dispatchQueue.dispatchAsync { [weak self] in self?.encodeAndBuffer(log: log) diff --git a/Sources/Swift/Tools/SentryLogger.swift b/Sources/Swift/Tools/SentryLogger.swift index 57a6c9fc1d1..5cae9883917 100644 --- a/Sources/Swift/Tools/SentryLogger.swift +++ b/Sources/Swift/Tools/SentryLogger.swift @@ -29,12 +29,12 @@ import Foundation /// ``` @objc public final class SentryLogger: NSObject { - private let hub: SentryHub + private let hub: SentryHubInternal private let dateProvider: SentryCurrentDateProvider // Nil in the case where the Hub's client is nil or logs are disabled through options. private let batcher: SentryLogBatcher? - @_spi(Private) public init(hub: SentryHub, dateProvider: SentryCurrentDateProvider, batcher: SentryLogBatcher?) { + init(hub: SentryHubInternal, dateProvider: SentryCurrentDateProvider, batcher: SentryLogBatcher?) { self.hub = hub self.dateProvider = dateProvider self.batcher = batcher diff --git a/Tests/DuplicatedSDKTest/DuplicatedSDKTest/DuplicatedSDKTest-Bridging-Header.h b/Tests/DuplicatedSDKTest/DuplicatedSDKTest/DuplicatedSDKTest-Bridging-Header.h index dc1c569169a..dae28c7e5c2 100644 --- a/Tests/DuplicatedSDKTest/DuplicatedSDKTest/DuplicatedSDKTest-Bridging-Header.h +++ b/Tests/DuplicatedSDKTest/DuplicatedSDKTest/DuplicatedSDKTest-Bridging-Header.h @@ -4,7 +4,7 @@ // Added to run integration tests, do not attempt this in your app @interface SentrySDKInternal : NSObject -+ (SentryHub *)currentHub; ++ (SentryHubInternal *)currentHub; @end diff --git a/Tests/SentryProfilerTests/SentryProfileTestFixture.swift b/Tests/SentryProfilerTests/SentryProfileTestFixture.swift index 8c5232ae45d..2f105b3c484 100644 --- a/Tests/SentryProfilerTests/SentryProfileTestFixture.swift +++ b/Tests/SentryProfilerTests/SentryProfileTestFixture.swift @@ -20,7 +20,7 @@ class SentryProfileTestFixture { let options: Options let client: TestClient? - let hub: SentryHub + let hub: SentryHubInternal let scope = Scope() let message = "some message" let transactionName = "Some Transaction" @@ -79,7 +79,7 @@ class SentryProfileTestFixture { options.dsn = SentryProfileTestFixture.dsnAsString options.debug = true client = TestClient(options: options) - hub = SentryHub(client: client, andScope: scope) + hub = SentryHubInternal(client: client, andScope: scope) hub.bindClient(client) SentrySDKInternal.setCurrentHub(hub) diff --git a/Tests/SentryProfilerTests/SentryProfilerTests.mm b/Tests/SentryProfilerTests/SentryProfilerTests.mm index 03f083b1ff8..1b8ce0c1987 100644 --- a/Tests/SentryProfilerTests/SentryProfilerTests.mm +++ b/Tests/SentryProfilerTests/SentryProfilerTests.mm @@ -204,7 +204,7 @@ - (void)testProfilerMutationDuringSerialization const auto serialization = sentry_serializedTraceProfileData(profileData, 1, 2, sentry_profilerTruncationReasonName(SentryProfilerTruncationReasonNormal), @{}, @[], - [[SentryHub alloc] initWithClient:nil andScope:nil] + [[SentryHubInternal alloc] initWithClient:nil andScope:nil] # if SENTRY_HAS_UIKIT , [[SentryScreenFrames alloc] initWithTotal:5 diff --git a/Tests/SentryProfilerTests/SentryProfilingPublicAPITests.swift b/Tests/SentryProfilerTests/SentryProfilingPublicAPITests.swift index 7f476355329..14f71e65d47 100644 --- a/Tests/SentryProfilerTests/SentryProfilingPublicAPITests.swift +++ b/Tests/SentryProfilerTests/SentryProfilingPublicAPITests.swift @@ -36,7 +36,7 @@ class SentryProfilingPublicAPITests: XCTestCase { let currentDate = TestCurrentDateProvider() lazy var timerFactory = TestSentryNSTimerFactory(currentDateProvider: currentDate) lazy var client = TestClient(options: options)! - lazy var hub = SentryHub(client: client, andScope: scope) + lazy var hub = SentryHubInternal(client: client, andScope: scope) } private let fixture = Fixture() @@ -483,7 +483,7 @@ private extension SentryProfilingPublicAPITests { } func givenSdkWithHubButNoClient() { - SentrySDKInternal.setCurrentHub(SentryHub(client: nil, andScope: nil)) + SentrySDKInternal.setCurrentHub(SentryHubInternal(client: nil, andScope: nil)) SentrySDKInternal.setStart(with: fixture.options) } diff --git a/Tests/SentryProfilerTests/SentryProfilingSwiftHelpersTests.m b/Tests/SentryProfilerTests/SentryProfilingSwiftHelpersTests.m index 1a93ecd7704..d056b701dba 100644 --- a/Tests/SentryProfilerTests/SentryProfilingSwiftHelpersTests.m +++ b/Tests/SentryProfilerTests/SentryProfilingSwiftHelpersTests.m @@ -1,6 +1,7 @@ @import XCTest; @import Sentry; @import SentryTestUtilsDynamic; +#import "SentryClient.h" #import "SentryOptions+Private.h" #import "SentryProfilingSwiftHelpers.h" @@ -16,7 +17,7 @@ - (void)testIsContinuousProfilingEnabled SentryOptions *options = [[SentryOptions alloc] init]; options.dsn = @"https://username:password@app.getsentry.com/12345"; options.profiling = [[SentryProfileOptions alloc] init]; - SentryClient *client = [[SentryClient alloc] initWithOptions:options]; + SentryClientInternal *client = [[SentryClientInternal alloc] initWithOptions:options]; XCTAssertEqual( [client.options isContinuousProfilingEnabled], sentry_isContinuousProfilingEnabled(client)); } @@ -27,7 +28,7 @@ - (void)testIsProfilingCorrelatedToTraces options.dsn = @"https://username:password@app.getsentry.com/12345"; options.profiling = [[SentryProfileOptions alloc] init]; options.profiling.lifecycle = SentryProfileLifecycleTrace; - SentryClient *client = [[SentryClient alloc] initWithOptions:options]; + SentryClientInternal *client = [[SentryClientInternal alloc] initWithOptions:options]; XCTAssertEqual([client.options isProfilingCorrelatedToTraces], sentry_isProfilingCorrelatedToTraces(client)); } @@ -37,7 +38,7 @@ - (void)testGetProfiling SentryOptions *options = [[SentryOptions alloc] init]; options.dsn = @"https://username:password@app.getsentry.com/12345"; options.profiling = [[SentryProfileOptions alloc] init]; - SentryClient *client = [[SentryClient alloc] initWithOptions:options]; + SentryClientInternal *client = [[SentryClientInternal alloc] initWithOptions:options]; XCTAssertEqual(client.options.profiling, sentry_getProfiling(client)); } @@ -46,7 +47,7 @@ - (void)testGetProfiling_whenProfilingOptionsIsNil_shouldReturnNil SentryOptions *options = [[SentryOptions alloc] init]; options.dsn = @"https://username:password@app.getsentry.com/12345"; options.profiling = nil; - SentryClient *client = [[SentryClient alloc] initWithOptions:options]; + SentryClientInternal *client = [[SentryClientInternal alloc] initWithOptions:options]; XCTAssertNil(sentry_getProfiling(client)); } diff --git a/Tests/SentrySwiftUITests/SentryTests-Bridging-Header.h b/Tests/SentrySwiftUITests/SentryTests-Bridging-Header.h index f8ea1378ab1..70ef6407478 100644 --- a/Tests/SentrySwiftUITests/SentryTests-Bridging-Header.h +++ b/Tests/SentrySwiftUITests/SentryTests-Bridging-Header.h @@ -1,3 +1,4 @@ +#import "SentryClient.h" #import "SentryDefaultUIViewControllerPerformanceTracker.h" #import "SentryHub+Private.h" #import "SentryPerformanceTracker.h" diff --git a/Tests/SentrySwiftUITests/SentryTraceViewModelTest.swift b/Tests/SentrySwiftUITests/SentryTraceViewModelTest.swift index a95be5c3dad..094f09bc02c 100644 --- a/Tests/SentrySwiftUITests/SentryTraceViewModelTest.swift +++ b/Tests/SentrySwiftUITests/SentryTraceViewModelTest.swift @@ -13,7 +13,7 @@ class SentryTraceViewModelTestCase: XCTestCase { func testCreateTransaction() throws { let option = Options() - SentrySDKInternal.setCurrentHub(SentryHub(client: SentryClient(options: option), andScope: nil)) + SentrySDKInternal.setCurrentHub(SentryHubInternal(client: SentryClientInternal(options: option), andScope: nil)) let viewModel = SentryTraceViewModel(name: "TestView", nameSource: .component, waitForFullDisplay: false) let spanId = viewModel.startSpan() @@ -27,7 +27,7 @@ class SentryTraceViewModelTestCase: XCTestCase { func testRootTransactionStarted() throws { let option = Options() - SentrySDKInternal.setCurrentHub(SentryHub(client: SentryClient(options: option), andScope: nil)) + SentrySDKInternal.setCurrentHub(SentryHubInternal(client: SentryClientInternal(options: option), andScope: nil)) let viewModel = SentryTraceViewModel(name: "RootTransactionTest", nameSource: .component, waitForFullDisplay: true) _ = viewModel.startSpan() @@ -40,7 +40,7 @@ class SentryTraceViewModelTestCase: XCTestCase { func testNoRootTransactionForCurrentTransactionRunning() throws { let option = Options() - SentrySDKInternal.setCurrentHub(SentryHub(client: SentryClient(options: option), andScope: nil)) + SentrySDKInternal.setCurrentHub(SentryHubInternal(client: SentryClientInternal(options: option), andScope: nil)) let testSpan = SentryPerformanceTracker.shared.startSpan(withName: "Test Root", nameSource: .component, operation: "Testing", origin: "Test") SentryPerformanceTracker.shared.pushActiveSpan(testSpan) @@ -58,7 +58,7 @@ class SentryTraceViewModelTestCase: XCTestCase { func testNoTransactionWhenViewAppeared() { let option = Options() - SentrySDKInternal.setCurrentHub(SentryHub(client: SentryClient(options: option), andScope: nil)) + SentrySDKInternal.setCurrentHub(SentryHubInternal(client: SentryClientInternal(options: option), andScope: nil)) let viewModel = SentryTraceViewModel(name: "TestView", nameSource: .component, waitForFullDisplay: false) viewModel.viewDidAppear() @@ -69,7 +69,7 @@ class SentryTraceViewModelTestCase: XCTestCase { func testFinishSpan() throws { let option = Options() - SentrySDKInternal.setCurrentHub(SentryHub(client: SentryClient(options: option), andScope: nil)) + SentrySDKInternal.setCurrentHub(SentryHubInternal(client: SentryClientInternal(options: option), andScope: nil)) let viewModel = SentryTraceViewModel(name: "FinishSpanTest", nameSource: .component, waitForFullDisplay: false) let spanId = try XCTUnwrap(viewModel.startSpan()) diff --git a/Tests/SentryTests/Integrations/Breadcrumbs/SentryAutoBreadcrumbTrackingIntegrationTests.swift b/Tests/SentryTests/Integrations/Breadcrumbs/SentryAutoBreadcrumbTrackingIntegrationTests.swift index 4adaff68240..bf313ef802d 100644 --- a/Tests/SentryTests/Integrations/Breadcrumbs/SentryAutoBreadcrumbTrackingIntegrationTests.swift +++ b/Tests/SentryTests/Integrations/Breadcrumbs/SentryAutoBreadcrumbTrackingIntegrationTests.swift @@ -85,7 +85,7 @@ class SentryAutoBreadcrumbTrackingIntegrationTests: XCTestCase { try self.install(sut: sut, options: options) let scope = Scope() - let hub = SentryHub(client: TestClient(options: Options()), andScope: scope) + let hub = SentryHubInternal(client: TestClient(options: Options()), andScope: scope) SentrySDKInternal.setCurrentHub(hub) let crumb = TestData.crumb diff --git a/Tests/SentryTests/Integrations/Feedback/SentryFeedbackTests.swift b/Tests/SentryTests/Integrations/Feedback/SentryFeedbackTests.swift index 4a8b76f3258..3630ab990c1 100644 --- a/Tests/SentryTests/Integrations/Feedback/SentryFeedbackTests.swift +++ b/Tests/SentryTests/Integrations/Feedback/SentryFeedbackTests.swift @@ -199,7 +199,7 @@ class SentryFeedbackTests: XCTestCase { let transport = TestTransport() let transportAdapter = TestTransportAdapter(transports: [transport], options: options) - let client = SentryClient( + let client = SentryClientInternal( options: options, transportAdapter: transportAdapter, fileManager: try XCTUnwrap(SentryFileManager( @@ -241,7 +241,7 @@ class SentryFeedbackTests: XCTestCase { let transport = TestTransport() let transportAdapter = TestTransportAdapter(transports: [transport], options: options) - let client = SentryClient( + let client = SentryClientInternal( options: options, transportAdapter: transportAdapter, fileManager: try XCTUnwrap(SentryFileManager( @@ -283,7 +283,7 @@ class SentryFeedbackTests: XCTestCase { let transport = TestTransport() let transportAdapter = TestTransportAdapter(transports: [transport], options: options) - let client = SentryClient( + let client = SentryClientInternal( options: options, transportAdapter: transportAdapter, fileManager: try XCTUnwrap(SentryFileManager( diff --git a/Tests/SentryTests/Integrations/Performance/IO/SentryFileIOTrackerSwiftHelpersTests.swift b/Tests/SentryTests/Integrations/Performance/IO/SentryFileIOTrackerSwiftHelpersTests.swift index 03b75723282..e979629c839 100644 --- a/Tests/SentryTests/Integrations/Performance/IO/SentryFileIOTrackerSwiftHelpersTests.swift +++ b/Tests/SentryTests/Integrations/Performance/IO/SentryFileIOTrackerSwiftHelpersTests.swift @@ -4,7 +4,7 @@ import XCTest class SentryFileIOTrackerSwiftHelpersTests: XCTestCase { - private var hub: SentryHub! + private var hub: SentryHubInternal! private var tracker: SentryFileIOTracker! private var mockedDateProvider: TestCurrentDateProvider! @@ -24,7 +24,7 @@ class SentryFileIOTrackerSwiftHelpersTests: XCTestCase { mockedDateProvider = TestCurrentDateProvider() SentryDependencyContainer.sharedInstance().dateProvider = mockedDateProvider - hub = SentryHub(client: nil, andScope: nil) + hub = SentryHubInternal(client: nil, andScope: nil) SentrySDKInternal.setCurrentHub(hub) tracker = SentryFileIOTracker( diff --git a/Tests/SentryTests/Integrations/Performance/UIViewController/SentryTimeToDisplayTrackerTest.swift b/Tests/SentryTests/Integrations/Performance/UIViewController/SentryTimeToDisplayTrackerTest.swift index 271bfbf50b7..81a9cc49ee8 100644 --- a/Tests/SentryTests/Integrations/Performance/UIViewController/SentryTimeToDisplayTrackerTest.swift +++ b/Tests/SentryTests/Integrations/Performance/UIViewController/SentryTimeToDisplayTrackerTest.swift @@ -39,7 +39,7 @@ class SentryTimeToDisplayTrackerTest: XCTestCase { dispatchQueueWrapper: dispatchQueue ) - let hub = TestHub(client: SentryClient(options: options, fileManager: fileManager), andScope: nil) + let hub = TestHub(client: SentryClientInternal(options: options, fileManager: fileManager), andScope: nil) return SentryTracer(transactionContext: TransactionContext(operation: "ui.load"), hub: hub, configuration: SentryTracerConfiguration(block: { $0.waitForChildren = true })) diff --git a/Tests/SentryTests/Integrations/SentryCrash/SentryCrashIntegrationTests.swift b/Tests/SentryTests/Integrations/SentryCrash/SentryCrashIntegrationTests.swift index fd43fef1776..bba89db4c9b 100644 --- a/Tests/SentryTests/Integrations/SentryCrash/SentryCrashIntegrationTests.swift +++ b/Tests/SentryTests/Integrations/SentryCrash/SentryCrashIntegrationTests.swift @@ -9,7 +9,7 @@ class SentryCrashIntegrationTests: NotificationCenterTestCase { private class Fixture { let dateProvider = TestCurrentDateProvider() let dispatchQueueWrapper = TestSentryDispatchQueueWrapper() - let hub: SentryHub + let hub: SentryHubInternal let client: TestClient! let options: Options let sentryCrash: TestSentryCrashWrapper @@ -398,7 +398,7 @@ class SentryCrashIntegrationTests: NotificationCenterTestCase { api?.pointee.setEnabled(true) let transport = TestTransport() - let client = SentryClient(options: fixture.options, fileManager: fixture.fileManager) + let client = SentryClientInternal(options: fixture.options, fileManager: fixture.fileManager) Dynamic(client).transportAdapter = TestTransportAdapter(transports: [transport], options: fixture.options) hub.bindClient(client) @@ -557,9 +557,9 @@ class SentryCrashIntegrationTests: NotificationCenterTestCase { let options = fixture.options options.enablePersistingTracesWhenCrashing = true - let client = SentryClient(options: options) + let client = SentryClientInternal(options: options) defer { client?.fileManager.deleteAllEnvelopes() } - let hub = SentryHub(client: client, andScope: nil) + let hub = SentryHubInternal(client: client, andScope: nil) SentrySDKInternal.setCurrentHub(hub) let sut = fixture.getSut(crashWrapper: SentryDependencyContainer.sharedInstance().crashWrapper) @@ -582,9 +582,9 @@ class SentryCrashIntegrationTests: NotificationCenterTestCase { let options = fixture.options options.enablePersistingTracesWhenCrashing = true - let client = SentryClient(options: options) + let client = SentryClientInternal(options: options) defer { client?.fileManager.deleteAllEnvelopes() } - let hub = SentryHub(client: client, andScope: nil) + let hub = SentryHubInternal(client: client, andScope: nil) SentrySDKInternal.setCurrentHub(hub) let sut = fixture.getSut(crashWrapper: SentryDependencyContainer.sharedInstance().crashWrapper) @@ -603,9 +603,9 @@ class SentryCrashIntegrationTests: NotificationCenterTestCase { let options = fixture.options options.enablePersistingTracesWhenCrashing = true - let client = SentryClient(options: options) + let client = SentryClientInternal(options: options) defer { client?.fileManager.deleteAllEnvelopes() } - let hub = SentryHub(client: client, andScope: nil) + let hub = SentryHubInternal(client: client, andScope: nil) SentrySDKInternal.setCurrentHub(hub) let sut = fixture.getSut(crashWrapper: SentryDependencyContainer.sharedInstance().crashWrapper) @@ -647,7 +647,7 @@ class SentryCrashIntegrationTests: NotificationCenterTestCase { } #endif - private func givenSutWithGlobalHub() -> (SentryCrashIntegration, SentryHub) { + private func givenSutWithGlobalHub() -> (SentryCrashIntegration, SentryHubInternal) { let sut = fixture.getSut() let hub = fixture.hub SentrySDKInternal.setCurrentHub(hub) @@ -655,7 +655,7 @@ class SentryCrashIntegrationTests: NotificationCenterTestCase { return (sut, hub) } - private func givenSutWithGlobalHubAndCrashWrapper() -> (SentryCrashIntegration, SentryHub) { + private func givenSutWithGlobalHubAndCrashWrapper() -> (SentryCrashIntegration, SentryHubInternal) { #if os(iOS) || os(tvOS) || targetEnvironment(macCatalyst) SentryDependencyContainer.sharedInstance().uiDeviceWrapper.start() #endif @@ -723,7 +723,7 @@ class SentryCrashIntegrationTests: NotificationCenterTestCase { XCTAssertEqual(Locale.autoupdatingCurrent.identifier, device["locale"] as? String) } - private func assertLocaleOnHub(locale: String, hub: SentryHub) { + private func assertLocaleOnHub(locale: String, hub: SentryHubInternal) { let context = hub.scope.contextDictionary as? [String: Any] ?? ["": ""] guard let device = context["device"] as? [String: Any] else { diff --git a/Tests/SentryTests/Integrations/Session/SentrySessionGeneratorTests.swift b/Tests/SentryTests/Integrations/Session/SentrySessionGeneratorTests.swift index 8630441ba6e..5690bd5a7ef 100644 --- a/Tests/SentryTests/Integrations/Session/SentrySessionGeneratorTests.swift +++ b/Tests/SentryTests/Integrations/Session/SentrySessionGeneratorTests.swift @@ -144,7 +144,7 @@ class SentrySessionGeneratorTests: NotificationCenterTestCase { sentryCrash = TestSentryCrashWrapper(processInfoWrapper: ProcessInfo.processInfo) let client = SentrySDKInternal.currentHub().getClient() - let hub = SentryHub(client: client, andScope: nil, andCrashWrapper: self.sentryCrash, andDispatchQueue: SentryDispatchQueueWrapper()) + let hub = SentryHubInternal(client: client, andScope: nil, andCrashWrapper: self.sentryCrash, andDispatchQueue: SentryDispatchQueueWrapper()) SentrySDKInternal.setCurrentHub(hub) crashIntegration = SentryCrashIntegration(crashAdapter: sentryCrash, andDispatchQueueWrapper: TestSentryDispatchQueueWrapper()) diff --git a/Tests/SentryTests/Integrations/Session/SentrySessionTrackerTests.swift b/Tests/SentryTests/Integrations/Session/SentrySessionTrackerTests.swift index a43dd0c806d..ee0ed31e4e4 100644 --- a/Tests/SentryTests/Integrations/Session/SentrySessionTrackerTests.swift +++ b/Tests/SentryTests/Integrations/Session/SentrySessionTrackerTests.swift @@ -56,7 +56,7 @@ class SentrySessionTrackerTests: XCTestCase { } func setNewHubToSDK() { - let hub = SentryHub(client: client, andScope: nil, andCrashWrapper: self.sentryCrash, andDispatchQueue: SentryDispatchQueueWrapper()) + let hub = SentryHubInternal(client: client, andScope: nil, andCrashWrapper: self.sentryCrash, andDispatchQueue: SentryDispatchQueueWrapper()) SentrySDKInternal.setCurrentHub(hub) } } diff --git a/Tests/SentryTests/Integrations/SessionReplay/SentrySessionReplayIntegrationTests.swift b/Tests/SentryTests/Integrations/SessionReplay/SentrySessionReplayIntegrationTests.swift index 6a340f48b77..8d76a207cd1 100644 --- a/Tests/SentryTests/Integrations/SessionReplay/SentrySessionReplayIntegrationTests.swift +++ b/Tests/SentryTests/Integrations/SessionReplay/SentrySessionReplayIntegrationTests.swift @@ -208,7 +208,7 @@ class SentrySessionReplayIntegrationTests: XCTestCase { startSDK(sessionSampleRate: 1, errorSampleRate: 1) - let client = SentryClient(options: try XCTUnwrap(SentrySDKInternal.options)) + let client = SentryClientInternal(options: try XCTUnwrap(SentrySDKInternal.options)) let scope = Scope() let hub = TestHub(client: client, andScope: scope) SentrySDKInternal.setCurrentHub(hub) @@ -236,7 +236,7 @@ class SentrySessionReplayIntegrationTests: XCTestCase { startSDK(sessionSampleRate: 1, errorSampleRate: 1) - let client = SentryClient(options: try XCTUnwrap(SentrySDKInternal.options)) + let client = SentryClientInternal(options: try XCTUnwrap(SentrySDKInternal.options)) let scope = Scope() let hub = TestHub(client: client, andScope: scope) SentrySDKInternal.setCurrentHub(hub) @@ -273,7 +273,7 @@ class SentrySessionReplayIntegrationTests: XCTestCase { // capture all error replays if this were not a buffer replay from previous session startSDK(sessionSampleRate: 0, errorSampleRate: 1) - let client = SentryClient(options: try XCTUnwrap(SentrySDKInternal.options)) + let client = SentryClientInternal(options: try XCTUnwrap(SentrySDKInternal.options)) let scope = Scope() let hub = TestHub(client: client, andScope: scope) SentrySDKInternal.setCurrentHub(hub) @@ -313,7 +313,7 @@ class SentrySessionReplayIntegrationTests: XCTestCase { } }) - let client = SentryClient(options: try XCTUnwrap(SentrySDKInternal.options)) + let client = SentryClientInternal(options: try XCTUnwrap(SentrySDKInternal.options)) let scope = Scope() let hub = TestHub(client: client, andScope: scope) SentrySDKInternal.setCurrentHub(hub) diff --git a/Tests/SentryTests/Integrations/UIEvents/SentryUIEventTrackerTests.swift b/Tests/SentryTests/Integrations/UIEvents/SentryUIEventTrackerTests.swift index 3ab40a4ee98..8bc0f50255f 100644 --- a/Tests/SentryTests/Integrations/UIEvents/SentryUIEventTrackerTests.swift +++ b/Tests/SentryTests/Integrations/UIEvents/SentryUIEventTrackerTests.swift @@ -8,7 +8,7 @@ class SentryUIEventTrackerTests: XCTestCase { private class Fixture { let swizzleWrapper = TestSentrySwizzleWrapper() let target = FirstViewController() - let hub = SentryHub(client: TestClient(options: Options()), andScope: nil) + let hub = SentryHubInternal(client: TestClient(options: Options()), andScope: nil) let dispatchQueue = TestSentryDispatchQueueWrapper() let uiEventTrackerMode: SentryUIEventTrackerMode let button = UIButton() diff --git a/Tests/SentryTests/Integrations/WatchdogTerminations/SentryWatchdogTerminationTrackerTests.swift b/Tests/SentryTests/Integrations/WatchdogTerminations/SentryWatchdogTerminationTrackerTests.swift index 646804a1361..bbc42045462 100644 --- a/Tests/SentryTests/Integrations/WatchdogTerminations/SentryWatchdogTerminationTrackerTests.swift +++ b/Tests/SentryTests/Integrations/WatchdogTerminations/SentryWatchdogTerminationTrackerTests.swift @@ -42,7 +42,7 @@ class SentryWatchdogTerminationTrackerTests: NotificationCenterTestCase { crashWrapper = TestSentryCrashWrapper(processInfoWrapper: ProcessInfo.processInfo) - let hub = SentryHub(client: client, andScope: nil, andCrashWrapper: crashWrapper, andDispatchQueue: SentryDispatchQueueWrapper()) + let hub = SentryHubInternal(client: client, andScope: nil, andCrashWrapper: crashWrapper, andDispatchQueue: SentryDispatchQueueWrapper()) SentrySDKInternal.setCurrentHub(hub) } diff --git a/Tests/SentryTests/Integrations/WatchdogTerminations/SentryWatchdogTerminationTrackingIntegrationTests.swift b/Tests/SentryTests/Integrations/WatchdogTerminations/SentryWatchdogTerminationTrackingIntegrationTests.swift index 0eb3f949660..ad3550eb6f6 100644 --- a/Tests/SentryTests/Integrations/WatchdogTerminations/SentryWatchdogTerminationTrackingIntegrationTests.swift +++ b/Tests/SentryTests/Integrations/WatchdogTerminations/SentryWatchdogTerminationTrackingIntegrationTests.swift @@ -14,7 +14,7 @@ class SentryWatchdogTerminationIntegrationTests: XCTestCase { let fileManager: SentryFileManager let processInfoWrapper: MockSentryProcessInfo let watchdogTerminationAttributesProcessor: TestSentryWatchdogTerminationAttributesProcessor - let hub: SentryHub + let hub: SentryHubInternal let scope: Scope let appStateManager: SentryAppStateManager @@ -69,7 +69,7 @@ class SentryWatchdogTerminationIntegrationTests: XCTestCase { let client = TestClient(options: options) scope = Scope() - hub = SentryHub(client: client, andScope: scope, andCrashWrapper: crashWrapper, andDispatchQueue: dispatchQueueWrapper) + hub = SentryHubInternal(client: client, andScope: scope, andCrashWrapper: crashWrapper, andDispatchQueue: dispatchQueueWrapper) SentrySDKInternal.setCurrentHub(hub) } diff --git a/Tests/SentryTests/Networking/SentryDsnTests.m b/Tests/SentryTests/Networking/SentryDsnTests.m index 795a5f561de..4436879f1fd 100644 --- a/Tests/SentryTests/Networking/SentryDsnTests.m +++ b/Tests/SentryTests/Networking/SentryDsnTests.m @@ -1,7 +1,7 @@ #import "SentryDsn.h" #import "SentryError.h" #import "SentryMeta.h" -#import "SentryOptionsInternal.h" +#import "SentryOptionsHelpers.h" #import "SentrySwift.h" #import @@ -14,8 +14,8 @@ @implementation SentryDsnTests - (void)testMissingUsernamePassword { NSError *error = nil; - SentryOptions *options = [SentryOptionsInternal initWithDict:@{ @"dsn" : @"https://sentry.io" } - didFailWithError:&error]; + SentryOptions *options = [SentryOptionsHelpers initWithDict:@{ @"dsn" : @"https://sentry.io" } + didFailWithError:&error]; XCTAssertEqual(kSentryErrorInvalidDsnError, error.code); XCTAssertNil(options); } @@ -23,8 +23,8 @@ - (void)testMissingUsernamePassword - (void)testMissingScheme { NSError *error = nil; - SentryOptions *options = [SentryOptionsInternal initWithDict:@{ @"dsn" : @"https://sentry.io" } - didFailWithError:&error]; + SentryOptions *options = [SentryOptionsHelpers initWithDict:@{ @"dsn" : @"https://sentry.io" } + didFailWithError:&error]; XCTAssertEqual(kSentryErrorInvalidDsnError, error.code); XCTAssertNil(options); } @@ -32,8 +32,8 @@ - (void)testMissingScheme - (void)testMissingHost { NSError *error = nil; - SentryOptions *options = [SentryOptionsInternal initWithDict:@{ @"dsn" : @"http:///1" } - didFailWithError:&error]; + SentryOptions *options = [SentryOptionsHelpers initWithDict:@{ @"dsn" : @"http:///1" } + didFailWithError:&error]; XCTAssertEqual(kSentryErrorInvalidDsnError, error.code); XCTAssertNil(options); } @@ -41,8 +41,8 @@ - (void)testMissingHost - (void)testUnsupportedProtocol { NSError *error = nil; - SentryOptions *options = [SentryOptionsInternal initWithDict:@{ @"dsn" : @"ftp://sentry.io/1" } - didFailWithError:&error]; + SentryOptions *options = [SentryOptionsHelpers initWithDict:@{ @"dsn" : @"ftp://sentry.io/1" } + didFailWithError:&error]; XCTAssertEqual(kSentryErrorInvalidDsnError, error.code); XCTAssertNil(options); } diff --git a/Tests/SentryTests/Networking/SentryTransportInitializerTests.swift b/Tests/SentryTests/Networking/SentryTransportInitializerTests.swift index c44bbbaed6e..3b8863c841d 100644 --- a/Tests/SentryTests/Networking/SentryTransportInitializerTests.swift +++ b/Tests/SentryTests/Networking/SentryTransportInitializerTests.swift @@ -24,7 +24,7 @@ class SentryTransportInitializerTests: XCTestCase { } func testDefault() throws { - let options = try SentryOptionsInternal.initWithDict(["dsn": SentryTransportInitializerTests.dsnAsString]) + let options = try SentryOptionsHelpers.initWithDict(["dsn": SentryTransportInitializerTests.dsnAsString]) let result = TransportInitializer.initTransports( options, diff --git a/Tests/SentryTests/Protocol/SentrySDKSettingsTests.swift b/Tests/SentryTests/Protocol/SentrySDKSettingsTests.swift index e71c5281529..42f5d186439 100644 --- a/Tests/SentryTests/Protocol/SentrySDKSettingsTests.swift +++ b/Tests/SentryTests/Protocol/SentrySDKSettingsTests.swift @@ -13,7 +13,7 @@ class SentrySDKSettingsTests: XCTestCase { } func testInitWithOptions_WhenSendDefaultPiiTrue_SetsAutoInferIPToTrue() { - let options = try! SentryOptionsInternal.initWithDict([ + let options = try! SentryOptionsHelpers.initWithDict([ "dsn": "https://username:password@app.getsentry.com/12345", "sendDefaultPii": true ]) @@ -27,7 +27,7 @@ class SentrySDKSettingsTests: XCTestCase { } func testInitWithOptions_WhenSendDefaultPiiFalse_SetsAutoInferIPToFalse() { - let options = try! SentryOptionsInternal.initWithDict([ + let options = try! SentryOptionsHelpers.initWithDict([ "dsn": "https://username:password@app.getsentry.com/12345", "sendDefaultPii": false ]) diff --git a/Tests/SentryTests/SentryClient+TestInit.h b/Tests/SentryTests/SentryClient+TestInit.h index 4b6f05e80ba..c78a915b61d 100644 --- a/Tests/SentryTests/SentryClient+TestInit.h +++ b/Tests/SentryTests/SentryClient+TestInit.h @@ -11,7 +11,7 @@ NS_ASSUME_NONNULL_BEGIN -@interface SentryClient () +@interface SentryClientInternal () - (instancetype)initWithOptions:(SentryOptions *)options transportAdapter:(SentryTransportAdapter *)transportAdapter diff --git a/Tests/SentryTests/SentryClientTests.swift b/Tests/SentryTests/SentryClientTests.swift index b58d5fb2bf2..a5ffbcdb8ce 100644 --- a/Tests/SentryTests/SentryClientTests.swift +++ b/Tests/SentryTests/SentryClientTests.swift @@ -101,16 +101,16 @@ class SentryClientTests: XCTestCase { SentryDependencyContainer.sharedInstance().extraContextProvider = extraContentProvider } - func getSut(configureOptions: (Options) -> Void = { _ in }) -> SentryClient { - var client: SentryClient! + func getSut(configureOptions: (Options) -> Void = { _ in }) -> SentryClientInternal { + var client: SentryClientInternal! do { - let options = try SentryOptionsInternal.initWithDict([ + let options = try SentryOptionsHelpers.initWithDict([ "dsn": SentryClientTests.dsn ]) options.removeAllIntegrations() configureOptions(options) - client = SentryClient( + client = SentryClientInternal( options: options, transportAdapter: transportAdapter, fileManager: fileManager, @@ -127,13 +127,13 @@ class SentryClientTests: XCTestCase { return client } - func getSutWithNoDsn() -> SentryClient { + func getSutWithNoDsn() -> SentryClientInternal { getSut(configureOptions: { options in options.parsedDsn = nil }) } - func getSutDisabledSdk() -> SentryClient { + func getSutDisabledSdk() -> SentryClientInternal { getSut(configureOptions: { options in options.enabled = false }) @@ -178,7 +178,7 @@ class SentryClientTests: XCTestCase { } func testInit_CallsDeleteOldEnvelopeItemsInvocations() throws { - _ = SentryClient(options: Options(), fileManager: fixture.fileManager) + _ = SentryClientInternal(options: Options(), fileManager: fixture.fileManager) XCTAssertEqual(1, fixture.fileManager.deleteOldEnvelopeItemsInvocations.count) } @@ -402,7 +402,7 @@ class SentryClientTests: XCTestCase { SentryDependencyContainer.sharedInstance().applicationOverride = TestSentryUIApplication() let scope = fixture.scope scope.currentScreen = "TransactionScreen" - let hub = SentryHub(client: SentryClient(options: Options()), andScope: scope) + let hub = SentryHubInternal(client: SentryClientInternal(options: Options()), andScope: scope) let tracer = SentryTracer(transactionContext: TransactionContext(operation: "Operation"), hub: hub) @@ -454,7 +454,7 @@ class SentryClientTests: XCTestCase { return result } - sut.add(processor) + sut.addAttachmentProcessor(processor) sut.capture(event: event) let sentAttachments = fixture.transportAdapter.sendEventWithTraceStateInvocations.first?.attachments ?? [] @@ -475,7 +475,7 @@ class SentryClientTests: XCTestCase { return result } - sut.add(processor) + sut.addAttachmentProcessor(processor) sut.captureError(error, with: Scope()) { self.fixture.session } @@ -497,7 +497,7 @@ class SentryClientTests: XCTestCase { return result } - sut.add(processor) + sut.addAttachmentProcessor(processor) sut.captureError(error, with: Scope()) { return SentrySession(releaseName: "", distinctId: "some-id") } @@ -528,8 +528,8 @@ class SentryClientTests: XCTestCase { } // Order matters; second sees the output of the first. - sut.add(p1) - sut.add(p2) + sut.addAttachmentProcessor(p1) + sut.addAttachmentProcessor(p2) // -- Act -- sut.capture(event: event) @@ -564,8 +564,8 @@ class SentryClientTests: XCTestCase { return out } - sut.add(remover) - sut.add(adder) + sut.addAttachmentProcessor(remover) + sut.addAttachmentProcessor(adder) // -- Act -- sut.capture(event: event, scope: scope) @@ -1768,7 +1768,7 @@ class SentryClientTests: XCTestCase { let options = Options() options.dsn = SentryClientTests.dsn - let client = SentryClient(options: options) + let client = SentryClientInternal(options: options) XCTAssertNil(client) } @@ -1995,7 +1995,7 @@ class SentryClientTests: XCTestCase { func testConcurrentlyAddingInstalledIntegrations_WhileSendingEvents() { let sut = fixture.getSut() - let hub = SentryHub(client: sut, andScope: nil) + let hub = SentryHubInternal(client: sut, andScope: nil) SentrySDKInternal.setCurrentHub(hub) func addIntegrations(amount: Int) { @@ -2271,7 +2271,7 @@ private extension SentryClientTests { #endif } - private func beforeSendReturnsNil(capture: (SentryClient) -> Void) { + private func beforeSendReturnsNil(capture: (SentryClientInternal) -> Void) { capture(fixture.getSut(configureOptions: { options in options.beforeSend = { _ in nil diff --git a/Tests/SentryTests/SentryCrash/SentryCrashInstallationReporterTests.swift b/Tests/SentryTests/SentryCrash/SentryCrashInstallationReporterTests.swift index 03227fde04d..d135f886bbd 100644 --- a/Tests/SentryTests/SentryCrash/SentryCrashInstallationReporterTests.swift +++ b/Tests/SentryTests/SentryCrash/SentryCrashInstallationReporterTests.swift @@ -84,7 +84,7 @@ class SentryCrashInstallationReporterTests: XCTestCase { SentrySDK.start(options: options) testClient = TestClient(options: options) - let hub = SentryHub(client: testClient, andScope: nil) + let hub = SentryHubInternal(client: testClient, andScope: nil) SentrySDKInternal.setCurrentHub(hub) sut = SentryCrashInstallationReporter(inAppLogic: SentryInAppLogic(inAppIncludes: [], inAppExcludes: []), crashWrapper: TestSentryCrashWrapper(processInfoWrapper: ProcessInfo.processInfo), dispatchQueue: TestSentryDispatchQueueWrapper()) diff --git a/Tests/SentryTests/SentryHubTests.swift b/Tests/SentryTests/SentryHubTests.swift index d1b26f728d8..b3710274a2d 100644 --- a/Tests/SentryTests/SentryHubTests.swift +++ b/Tests/SentryTests/SentryHubTests.swift @@ -55,13 +55,13 @@ class SentryHubTests: XCTestCase { abnormalSession.environment = options.environment } - func getSut(withMaxBreadcrumbs maxBreadcrumbs: UInt = 100) -> SentryHub { + func getSut(withMaxBreadcrumbs maxBreadcrumbs: UInt = 100) -> SentryHubInternal { options.maxBreadcrumbs = maxBreadcrumbs return getSut(options) } - func getSut(_ options: Options, _ scope: Scope? = nil) -> SentryHub { - let hub = SentryHub(client: client, andScope: scope, andCrashWrapper: sentryCrashWrapper, andDispatchQueue: dispatchQueueWrapper) + func getSut(_ options: Options, _ scope: Scope? = nil) -> SentryHubInternal { + let hub = SentryHubInternal(client: client, andScope: scope, andCrashWrapper: sentryCrashWrapper, andDispatchQueue: dispatchQueueWrapper) hub.bindClient(client) return hub } @@ -97,7 +97,7 @@ class SentryHubTests: XCTestCase { sentryOption.dsn = "https://6cc9bae94def43cab8444a99e0031c28@o447951.ingest.sentry.io/5428557" let scope = Scope() - let sentryHub = SentryHub(client: SentryClient(options: sentryOption), andScope: scope) + let sentryHub = SentryHubInternal(client: SentryClientInternal(options: sentryOption), andScope: scope) let error = NSError(domain: "Test.CaptureErrorWithRealDSN", code: 12) sentryHub.capture(error: error) @@ -185,7 +185,7 @@ class SentryHubTests: XCTestCase { } func testScopeEnriched_WithInitializer() { - let hub = SentryHub(client: nil, andScope: Scope()) + let hub = SentryHubInternal(client: nil, andScope: Scope()) XCTAssertFalse(hub.scope.contextDictionary.allValues.isEmpty) XCTAssertNotNil(hub.scope.contextDictionary["os"]) XCTAssertNotNil(hub.scope.contextDictionary["device"]) @@ -200,7 +200,7 @@ class SentryHubTests: XCTestCase { let crashWrapper = SentryCrashWrapper(processInfoWrapper: processInfoWrapper) // Act - let hub = SentryHub(client: nil, andScope: Scope(), andCrashWrapper: crashWrapper, andDispatchQueue: TestSentryDispatchQueueWrapper()) + let hub = SentryHubInternal(client: nil, andScope: Scope(), andCrashWrapper: crashWrapper, andDispatchQueue: TestSentryDispatchQueueWrapper()) // Assert XCTAssertNil(hub.scope.contextDictionary["runtime"]) @@ -215,7 +215,7 @@ class SentryHubTests: XCTestCase { let crashWrapper = SentryCrashWrapper(processInfoWrapper: processInfoWrapper) // Act - let hub = SentryHub(client: nil, andScope: Scope(), andCrashWrapper: crashWrapper, andDispatchQueue: TestSentryDispatchQueueWrapper()) + let hub = SentryHubInternal(client: nil, andScope: Scope(), andCrashWrapper: crashWrapper, andDispatchQueue: TestSentryDispatchQueueWrapper()) // Assert let runtimeContext = try XCTUnwrap (hub.scope.contextDictionary["runtime"] as? [String: String]) @@ -233,7 +233,7 @@ class SentryHubTests: XCTestCase { let crashWrapper = SentryCrashWrapper(processInfoWrapper: processInfoWrapper) // Act - let hub = SentryHub(client: nil, andScope: Scope(), andCrashWrapper: crashWrapper, andDispatchQueue: TestSentryDispatchQueueWrapper()) + let hub = SentryHubInternal(client: nil, andScope: Scope(), andCrashWrapper: crashWrapper, andDispatchQueue: TestSentryDispatchQueueWrapper()) // Assert let runtimeContext = try XCTUnwrap (hub.scope.contextDictionary["runtime"] as? [String: String]) @@ -248,7 +248,7 @@ class SentryHubTests: XCTestCase { } func testScopeEnriched_WhenCreatingDefaultScope() { - let hub = SentryHub(client: nil, andScope: nil) + let hub = SentryHubInternal(client: nil, andScope: nil) let scope = hub.scope XCTAssertFalse(scope.contextDictionary.allValues.isEmpty) @@ -275,11 +275,11 @@ class SentryHubTests: XCTestCase { } func testAddUserToTheScope() throws { - let client = SentryClient( + let client = SentryClientInternal( options: fixture.options, fileManager: fixture.fileManager ) - let hub = SentryHub(client: client, andScope: Scope()) + let hub = SentryHubInternal(client: client, andScope: Scope()) let user = User() user.userId = "123" @@ -573,7 +573,7 @@ class SentryHubTests: XCTestCase { func testSaveCrashTransaction_SavesTransaction() throws { let scope = fixture.scope - let sut = SentryHub(client: fixture.client, andScope: scope) + let sut = SentryHubInternal(client: fixture.client, andScope: scope) let transaction = sut.startTransaction(transactionContext: TransactionContext(name: fixture.transactionName, operation: fixture.transactionOperation, sampled: .yes, sampleRate: nil, sampleRand: nil)) @@ -589,7 +589,7 @@ class SentryHubTests: XCTestCase { func testSaveCrashTransaction_withSampleRateRand_SavesTransaction() throws { // Arrange let scope = fixture.scope - let sut = SentryHub(client: fixture.client, andScope: scope) + let sut = SentryHubInternal(client: fixture.client, andScope: scope) let transaction = sut.startTransaction( transactionContext: TransactionContext( @@ -614,7 +614,7 @@ class SentryHubTests: XCTestCase { func testSaveCrashTransaction_NotSampled_DoesNotSaveTransaction() throws { let scope = fixture.scope - let sut = SentryHub(client: fixture.client, andScope: scope) + let sut = SentryHubInternal(client: fixture.client, andScope: scope) let transaction = sut.startTransaction(transactionContext: TransactionContext(name: fixture.transactionName, operation: fixture.transactionOperation, sampled: .no, sampleRate: nil, sampleRand: nil)) @@ -626,7 +626,7 @@ class SentryHubTests: XCTestCase { func testSaveCrashTransaction_NotSampledWithSampleRateRand_DoesNotSaveTransaction() throws { let scope = fixture.scope - let sut = SentryHub(client: fixture.client, andScope: scope) + let sut = SentryHubInternal(client: fixture.client, andScope: scope) let transaction = sut.startTransaction( transactionContext: TransactionContext( @@ -951,7 +951,7 @@ class SentryHubTests: XCTestCase { sut = fixture.getSut() let options = fixture.options options.releaseName = nil - let client = SentryClient(options: options) + let client = SentryClientInternal(options: options) sut.bindClient(client) givenCrashedSession() @@ -1046,7 +1046,7 @@ class SentryHubTests: XCTestCase { sut = fixture.getSut() let options = fixture.options options.releaseName = nil - let client = SentryClient(options: options) + let client = SentryClientInternal(options: options) sut.bindClient(client) // Act @@ -1126,7 +1126,7 @@ class SentryHubTests: XCTestCase { } func testCaptureReplay() { - class SentryClientMockReplay: SentryClient { + class SentryClientMockReplay: SentryClientInternal { var replayEvent: SentryReplayEvent? var replayRecording: SentryReplayRecording? var videoUrl: URL? @@ -1245,13 +1245,13 @@ class SentryHubTests: XCTestCase { } } - private func addBreadcrumbThroughConfigureScope(_ hub: SentryHub) { + private func addBreadcrumbThroughConfigureScope(_ hub: SentryHubInternal) { hub.configureScope({ scope in scope.addBreadcrumb(self.fixture.crumb) }) } - private func captureConcurrentWithSession(count: Int, _ capture: @escaping (SentryHub) -> Void) { + private func captureConcurrentWithSession(count: Int, _ capture: @escaping (SentryHubInternal) -> Void) { let sut = fixture.getSut() sut.startSession() @@ -1431,7 +1431,7 @@ class SentryHubTests: XCTestCase { fixture.currentDateProvider.setDate(date: fixture.currentDateProvider.date().addingTimeInterval(bySeconds)) } - private func assert(withScopeBreadcrumbsCount count: Int, with hub: SentryHub) { + private func assert(withScopeBreadcrumbsCount count: Int, with hub: SentryHubInternal) { let scopeBreadcrumbs = hub.scope.serialize()["breadcrumbs"] as? [AnyHashable] XCTAssertNotNil(scopeBreadcrumbs) XCTAssertEqual(scopeBreadcrumbs?.count, count) diff --git a/Tests/SentryTests/SentryInterfacesTests.m b/Tests/SentryTests/SentryInterfacesTests.m index 02de3a1f82d..154f1820bf1 100644 --- a/Tests/SentryTests/SentryInterfacesTests.m +++ b/Tests/SentryTests/SentryInterfacesTests.m @@ -6,6 +6,7 @@ #import "SentryEvent.h" #import "SentryException.h" #import "SentryFrame.h" +#import "SentryId.h" #import "SentryMechanism.h" #import "SentryMeta.h" #import "SentryStackTrace.h" diff --git a/Tests/SentryTests/SentryOptionsTest.m b/Tests/SentryTests/SentryOptionsTest.m index 97ff6820ad5..37458ffd8ff 100644 --- a/Tests/SentryTests/SentryOptionsTest.m +++ b/Tests/SentryTests/SentryOptionsTest.m @@ -1,6 +1,6 @@ #import "SentryOptions.h" #import "SentryError.h" -#import "SentryOptionsInternal.h" +#import "SentryOptionsHelpers.h" #import "SentrySDKInternal.h" #import "SentrySpan.h" #import "SentryTests-Swift.h" @@ -15,7 +15,7 @@ @implementation SentryOptionsTest - (void)testEmptyDsn { NSError *error = nil; - SentryOptions *options = [SentryOptionsInternal initWithDict:@{} didFailWithError:&error]; + SentryOptions *options = [SentryOptionsHelpers initWithDict:@{} didFailWithError:&error]; XCTAssertNil(options.parsedDsn); XCTAssertEqual(NO, options.debug); @@ -27,8 +27,8 @@ - (void)testEmptyDsn - (void)testInvalidDsnBoolean { NSError *error = nil; - SentryOptions *options = [SentryOptionsInternal initWithDict:@{ @"dsn" : @YES } - didFailWithError:&error]; + SentryOptions *options = [SentryOptionsHelpers initWithDict:@{ @"dsn" : @YES } + didFailWithError:&error]; [self assertDsnNil:options andError:error]; } @@ -43,16 +43,16 @@ - (void)assertDsnNil:(SentryOptions *)options andError:(NSError *)error - (void)testInvalidDsn { NSError *error = nil; - SentryOptions *options = [SentryOptionsInternal initWithDict:@{ @"dsn" : @"https://sentry.io" } - didFailWithError:&error]; + SentryOptions *options = [SentryOptionsHelpers initWithDict:@{ @"dsn" : @"https://sentry.io" } + didFailWithError:&error]; XCTAssertEqual(kSentryErrorInvalidDsnError, error.code); XCTAssertNil(options); } - (void)testInvalidDsnWithNoErrorArgument { - SentryOptions *options = [SentryOptionsInternal initWithDict:@{ @"dsn" : @"https://sentry.io" } - didFailWithError:nil]; + SentryOptions *options = [SentryOptionsHelpers initWithDict:@{ @"dsn" : @"https://sentry.io" } + didFailWithError:nil]; XCTAssertNil(options); } @@ -129,11 +129,11 @@ - (void)testInvalidDebug - (void)testDebugWith:(NSObject *)debugValue expected:(BOOL)expectedDebugValue { NSError *error = nil; - SentryOptions *options = [SentryOptionsInternal initWithDict:@{ + SentryOptions *options = [SentryOptionsHelpers initWithDict:@{ @"dsn" : @"https://username:password@sentry.io/1", @"debug" : debugValue } - didFailWithError:&error]; + didFailWithError:&error]; XCTAssertNil(error); XCTAssertEqual(expectedDebugValue, options.debug); @@ -603,7 +603,7 @@ - (void)testEmptyConstructorSetsDefaultValues - (void)testNSNull_SetsDefaultValue { - SentryOptions *options = [SentryOptionsInternal initWithDict:@{ + SentryOptions *options = [SentryOptionsHelpers initWithDict:@{ @"urlSession" : [NSNull null], @"dsn" : [NSNull null], @"enabled" : [NSNull null], @@ -660,7 +660,7 @@ - (void)testNSNull_SetsDefaultValue @"swiftAsyncStacktraces" : [NSNull null], @"spotlightUrl" : [NSNull null] } - didFailWithError:nil]; + didFailWithError:nil]; XCTAssertNil(options.parsedDsn); [self assertDefaultValues:options]; @@ -1153,8 +1153,8 @@ - (SentryOptions *)getValidOptions:(NSDictionary *)dict [options addEntriesFromDictionary:dict]; - SentryOptions *sentryOptions = [SentryOptionsInternal initWithDict:options - didFailWithError:&error]; + SentryOptions *sentryOptions = [SentryOptionsHelpers initWithDict:options + didFailWithError:&error]; XCTAssertNil(error); return sentryOptions; } diff --git a/Tests/SentryTests/SentrySDKIntegrationTestsBase.swift b/Tests/SentryTests/SentrySDKIntegrationTestsBase.swift index 1e317a8cbe1..752941a1b3c 100644 --- a/Tests/SentryTests/SentrySDKIntegrationTestsBase.swift +++ b/Tests/SentryTests/SentrySDKIntegrationTestsBase.swift @@ -28,7 +28,7 @@ class SentrySDKIntegrationTestsBase: XCTestCase { func givenSdkWithHub(_ options: Options? = nil, scope: Scope = Scope()) { let client = TestClient(options: options ?? self.options) - let hub = SentryHub(client: client, andScope: scope, andCrashWrapper: TestSentryCrashWrapper(processInfoWrapper: ProcessInfo.processInfo), andDispatchQueue: SentryDispatchQueueWrapper()) + let hub = SentryHubInternal(client: client, andScope: scope, andCrashWrapper: TestSentryCrashWrapper(processInfoWrapper: ProcessInfo.processInfo), andDispatchQueue: SentryDispatchQueueWrapper()) SentrySDKInternal.setStart(with: self.options) SentrySDKInternal.setCurrentHub(hub) diff --git a/Tests/SentryTests/SentrySDKInternal+Tests.h b/Tests/SentryTests/SentrySDKInternal+Tests.h index 54d7e28fb92..7130e76825a 100644 --- a/Tests/SentryTests/SentrySDKInternal+Tests.h +++ b/Tests/SentryTests/SentrySDKInternal+Tests.h @@ -7,7 +7,7 @@ NS_ASSUME_NONNULL_BEGIN @interface SentrySDKInternal () -+ (void)setCurrentHub:(nullable SentryHub *)hub; ++ (void)setCurrentHub:(nullable SentryHubInternal *)hub; + (void)setStartOptions:(nullable SentryOptions *)options NS_SWIFT_NAME(setStart(with:)); diff --git a/Tests/SentryTests/SentrySDKInternalTests.swift b/Tests/SentryTests/SentrySDKInternalTests.swift index 954e080e415..e9297a48d63 100644 --- a/Tests/SentryTests/SentrySDKInternalTests.swift +++ b/Tests/SentryTests/SentrySDKInternalTests.swift @@ -19,7 +19,7 @@ class SentrySDKInternalTests: XCTestCase { let event: Event let scope: Scope let client: TestClient - let hub: SentryHub + let hub: SentryHubInternal let error: Error = NSError(domain: "", code: 0, userInfo: [NSLocalizedDescriptionKey: "Object does not exist"]) let exception = NSException(name: NSExceptionName("My Custom exeption"), reason: "User clicked the button", userInfo: nil) let feedback: SentryFeedback @@ -56,7 +56,7 @@ class SentrySDKInternalTests: XCTestCase { scope.setTag(value: "value", key: "key") client = TestClient(options: options)! - hub = SentryHub(client: client, andScope: scope, andCrashWrapper: TestSentryCrashWrapper(processInfoWrapper: ProcessInfo.processInfo), andDispatchQueue: SentryDispatchQueueWrapper()) + hub = SentryHubInternal(client: client, andScope: scope, andCrashWrapper: TestSentryCrashWrapper(processInfoWrapper: ProcessInfo.processInfo), andDispatchQueue: SentryDispatchQueueWrapper()) feedback = SentryFeedback(message: "Again really?", name: "Tim Apple", email: "tim@apple.com") @@ -608,7 +608,7 @@ class SentrySDKInternalTests: XCTestCase { let transport = TestTransport() let fileManager = try TestFileManager(options: fixture.options, dateProvider: fixture.currentDate, dispatchQueueWrapper: fixture.dispatchQueueWrapper) - let client = SentryClient(options: fixture.options, fileManager: fileManager) + let client = SentryClientInternal(options: fixture.options, fileManager: fileManager) Dynamic(client).transportAdapter = TestTransportAdapter(transports: [transport], options: fixture.options) SentrySDKInternal.currentHub().bindClient(client) SentrySDK.close() @@ -663,7 +663,7 @@ class SentrySDKInternalTests: XCTestCase { func testLogger_WithNoClient_DoesNotCaptureLog() { fixture.client.options.enableLogs = true - let hubWithoutClient = SentryHub(client: nil, andScope: nil) + let hubWithoutClient = SentryHubInternal(client: nil, andScope: nil) SentrySDKInternal.setCurrentHub(hubWithoutClient) SentrySDK.logger.error(String(repeating: "S", count: 1_024 * 1_024)) @@ -693,7 +693,7 @@ class SentrySDKInternalTests: XCTestCase { let transport = TestTransport() let fileManager = try TestFileManager(options: fixture.options, dateProvider: fixture.currentDate, dispatchQueueWrapper: fixture.dispatchQueueWrapper) - let client = SentryClient(options: fixture.options, fileManager: fileManager) + let client = SentryClientInternal(options: fixture.options, fileManager: fileManager) Dynamic(client).transportAdapter = TestTransportAdapter(transports: [transport], options: fixture.options) SentrySDKInternal.currentHub().bindClient(client) @@ -989,7 +989,7 @@ private extension SentrySDKInternalTests { } func givenSdkWithHubButNoClient() { - SentrySDKInternal.setCurrentHub(SentryHub(client: nil, andScope: nil)) + SentrySDKInternal.setCurrentHub(SentryHubInternal(client: nil, andScope: nil)) SentrySDKInternal.setStart(with: fixture.options) } @@ -1030,7 +1030,7 @@ class SentrySDKWithSetupTests: XCTestCase { } concurrentQueue.async { - let hub = SentryHub(client: nil, andScope: nil) + let hub = SentryHubInternal(client: nil, andScope: nil) XCTAssertNotNil(hub) expectation.fulfill() diff --git a/Tests/SentryTests/SentrySDKTests.swift b/Tests/SentryTests/SentrySDKTests.swift index cf3d3745ce3..03c2d8708f9 100644 --- a/Tests/SentryTests/SentrySDKTests.swift +++ b/Tests/SentryTests/SentrySDKTests.swift @@ -18,7 +18,7 @@ class SentrySDKTests: XCTestCase { let event: Event let scope: Scope let client: TestClient - let hub: SentryHub + let hub: SentryHubInternal let error: Error = NSError(domain: "", code: 0, userInfo: [NSLocalizedDescriptionKey: "Object does not exist"]) let exception = NSException(name: NSExceptionName("My Custom exeption"), reason: "User clicked the button", userInfo: nil) let feedback: SentryFeedback @@ -55,7 +55,7 @@ class SentrySDKTests: XCTestCase { scope.setTag(value: "value", key: "key") client = TestClient(options: options)! - hub = SentryHub(client: client, andScope: scope, andCrashWrapper: TestSentryCrashWrapper(processInfoWrapper: ProcessInfo.processInfo), andDispatchQueue: SentryDispatchQueueWrapper()) + hub = SentryHubInternal(client: client, andScope: scope, andCrashWrapper: TestSentryCrashWrapper(processInfoWrapper: ProcessInfo.processInfo), andDispatchQueue: SentryDispatchQueueWrapper()) feedback = SentryFeedback(message: "Again really?", name: "Tim Apple", email: "tim@apple.com") @@ -556,7 +556,7 @@ extension SentrySDKTests { } private func givenSdkWithHubButNoClient() { - SentrySDKInternal.setCurrentHub(SentryHub(client: nil, andScope: nil)) + SentrySDKInternal.setCurrentHub(SentryHubInternal(client: nil, andScope: nil)) SentrySDKInternal.setStart(with: fixture.options) } diff --git a/Tests/SentryTests/SentrySDKThreadTests.swift b/Tests/SentryTests/SentrySDKThreadTests.swift index e46433970e9..802afc8fbde 100644 --- a/Tests/SentryTests/SentrySDKThreadTests.swift +++ b/Tests/SentryTests/SentrySDKThreadTests.swift @@ -5,7 +5,7 @@ final class SentrySDKThreadTests: XCTestCase { func testRaceWhenBindingClient() { let options = Options() - let sut = SentryHub(client: SentryClient(options: options), andScope: nil) + let sut = SentryHubInternal(client: SentryClientInternal(options: options), andScope: nil) for _ in 0..<100 { @@ -16,7 +16,7 @@ final class SentrySDKThreadTests: XCTestCase { for _ in 0..<100 { queue.async { - sut.bindClient(SentryClient(options: options)) + sut.bindClient(SentryClientInternal(options: options)) sut.capture(message: "Test message") exp.fulfill() } diff --git a/Tests/SentryTests/SentryTests-Bridging-Header.h b/Tests/SentryTests/SentryTests-Bridging-Header.h index acb855e6d4c..c69c7ae5026 100644 --- a/Tests/SentryTests/SentryTests-Bridging-Header.h +++ b/Tests/SentryTests/SentryTests-Bridging-Header.h @@ -137,7 +137,7 @@ #import "SentryNetworkTrackingIntegration.h" #import "SentryNoOpSpan.h" #import "SentryOptions+Private.h" -#import "SentryOptionsInternal.h" +#import "SentryOptionsHelpers.h" #import "SentryPerformanceTracker+Testing.h" #import "SentryPerformanceTracker.h" #import "SentryPerformanceTrackingIntegration.h" diff --git a/Tests/SentryTests/SentryTests.m b/Tests/SentryTests/SentryTests.m index 946ef24fbbd..6ba8ff45996 100644 --- a/Tests/SentryTests/SentryTests.m +++ b/Tests/SentryTests/SentryTests.m @@ -8,7 +8,7 @@ #import "SentryLevelMapper.h" #import "SentryMessage.h" #import "SentryMeta.h" -#import "SentryOptionsInternal.h" +#import "SentryOptionsHelpers.h" #import "SentrySDK+Private.h" #import #import @@ -34,11 +34,11 @@ - (void)setUp - (void)testSharedClient { NSError *error = nil; - SentryOptions *options = [SentryOptionsInternal + SentryOptions *options = [SentryOptionsHelpers initWithDict:@{ @"dsn" : @"https://username:password@app.getsentry.com/12345" } didFailWithError:&error]; - SentryClient *client = [[SentryClient alloc] initWithOptions:options]; + SentryClientInternal *client = [[SentryClientInternal alloc] initWithOptions:options]; XCTAssertNil(error); XCTAssertNil([SentrySDKInternal.currentHub getClient]); [SentrySDKInternal.currentHub bindClient:client]; diff --git a/Tests/SentryTests/Transaction/SentrySpanTests.swift b/Tests/SentryTests/Transaction/SentrySpanTests.swift index 842a1538ebe..409f3e183de 100644 --- a/Tests/SentryTests/Transaction/SentrySpanTests.swift +++ b/Tests/SentryTests/Transaction/SentrySpanTests.swift @@ -35,8 +35,8 @@ class SentrySpanTests: XCTestCase { return getSut(client: TestClient(options: options)!) } - func getSut(client: SentryClient) -> Span { - let hub = SentryHub(client: client, andScope: nil, andCrashWrapper: TestSentryCrashWrapper(processInfoWrapper: ProcessInfo.processInfo), andDispatchQueue: TestSentryDispatchQueueWrapper()) + func getSut(client: SentryClientInternal) -> Span { + let hub = SentryHubInternal(client: client, andScope: nil, andCrashWrapper: TestSentryCrashWrapper(processInfoWrapper: ProcessInfo.processInfo), andDispatchQueue: TestSentryDispatchQueueWrapper()) return hub.startTransaction(name: someTransaction, operation: someOperation) } diff --git a/Tests/SentryTests/Transaction/SentryTransactionTests.swift b/Tests/SentryTests/Transaction/SentryTransactionTests.swift index dbde00e7454..58bf568ffdf 100644 --- a/Tests/SentryTests/Transaction/SentryTransactionTests.swift +++ b/Tests/SentryTests/Transaction/SentryTransactionTests.swift @@ -23,7 +23,7 @@ class SentryTransactionTests: XCTestCase { return SentryTracer(transactionContext: getContext(), hub: nil) } - func getHub() -> SentryHub { + func getHub() -> SentryHubInternal { let scope = Scope() let client = TestClient(options: Options())! client.options.tracesSampleRate = 1 diff --git a/sdk_api.json b/sdk_api.json index 189b9578c93..c9effc0bbd7 100644 --- a/sdk_api.json +++ b/sdk_api.json @@ -44,16 +44,6 @@ "Exported" ] }, - { - "kind": "Import", - "name": "Sentry.SentryClient", - "printedName": "Sentry.SentryClient", - "declKind": "Import", - "moduleName": "Sentry", - "declAttributes": [ - "Exported" - ] - }, { "kind": "Import", "name": "Sentry.SentryCrashExceptionApplication", @@ -176,8 +166,8 @@ }, { "kind": "Import", - "name": "Sentry.SentryHub", - "printedName": "Sentry.SentryHub", + "name": "Sentry.SentryId", + "printedName": "Sentry.SentryId", "declKind": "Import", "moduleName": "Sentry", "declAttributes": [ @@ -948,7 +938,7 @@ "kind": "TypeNominal", "name": "SentryId", "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" + "usr": "c:objc(cs)SentryId" } ], "declKind": "Var", @@ -970,7 +960,7 @@ "kind": "TypeNominal", "name": "SentryId", "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" + "usr": "c:objc(cs)SentryId" } ], "declKind": "Accessor", @@ -1648,7 +1638,7 @@ "kind": "TypeNominal", "name": "SentryId", "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" + "usr": "c:objc(cs)SentryId" }, { "kind": "TypeNominal", @@ -1766,7 +1756,7 @@ "kind": "TypeNominal", "name": "SentryId", "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" + "usr": "c:objc(cs)SentryId" }, { "kind": "TypeNominal", @@ -3811,7 +3801,7 @@ "kind": "TypeNominal", "name": "SentryId", "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" + "usr": "c:objc(cs)SentryId" } ], "declKind": "Var", @@ -3833,7 +3823,7 @@ "kind": "TypeNominal", "name": "SentryId", "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" + "usr": "c:objc(cs)SentryId" } ], "declKind": "Accessor", @@ -3869,7 +3859,7 @@ "kind": "TypeNominal", "name": "SentryId", "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" + "usr": "c:objc(cs)SentryId" } ], "declKind": "Accessor", @@ -24168,74 +24158,26 @@ }, { "kind": "TypeDecl", - "name": "SentryClient", - "printedName": "SentryClient", + "name": "SentryDsn", + "printedName": "SentryDsn", "children": [ { "kind": "Var", - "name": "isEnabled", - "printedName": "isEnabled", - "children": [ - { - "kind": "TypeNominal", - "name": "Bool", - "printedName": "Swift.Bool", - "usr": "s:Sb" - } - ], - "declKind": "Var", - "usr": "c:objc(cs)SentryClient(py)isEnabled", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "isEnabled", - "declAttributes": [ - "ObjC", - "Dynamic" - ], - "accessors": [ - { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ - { - "kind": "TypeNominal", - "name": "Bool", - "printedName": "Swift.Bool", - "usr": "s:Sb" - } - ], - "declKind": "Accessor", - "usr": "c:objc(cs)SentryClient(im)isEnabled", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "isEnabled", - "declAttributes": [ - "DiscardableResult", - "ObjC", - "Dynamic" - ], - "accessorKind": "get" - } - ] - }, - { - "kind": "Var", - "name": "options", - "printedName": "options", + "name": "url", + "printedName": "url", "children": [ { "kind": "TypeNominal", - "name": "Options", - "printedName": "Sentry.Options", - "usr": "c:objc(cs)SentryOptions" + "name": "URL", + "printedName": "Foundation.URL", + "usr": "s:10Foundation3URLV" } ], "declKind": "Var", - "usr": "c:objc(cs)SentryClient(py)options", + "usr": "c:objc(cs)SentryDsn(py)url", "moduleName": "Sentry", "isOpen": true, - "objc_name": "options", + "objc_name": "url", "declAttributes": [ "ObjC", "Dynamic" @@ -24248,305 +24190,59 @@ "children": [ { "kind": "TypeNominal", - "name": "Options", - "printedName": "Sentry.Options", - "usr": "c:objc(cs)SentryOptions" + "name": "URL", + "printedName": "Foundation.URL", + "usr": "s:10Foundation3URLV" } ], "declKind": "Accessor", - "usr": "c:objc(cs)SentryClient(im)options", + "usr": "c:objc(cs)SentryDsn(im)url", "moduleName": "Sentry", "isOpen": true, - "objc_name": "options", + "objc_name": "url", "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": "Options", - "printedName": "Sentry.Options", - "usr": "c:objc(cs)SentryOptions" - } - ], - "declKind": "Accessor", - "usr": "c:objc(cs)SentryClient(im)setOptions:", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "setOptions:", - "declAttributes": [ - "ObjC", - "Dynamic" - ], - "accessorKind": "set" } ] }, { "kind": "Constructor", "name": "init", - "printedName": "init(options:)", + "printedName": "init(string:)", "children": [ { "kind": "TypeNominal", - "name": "Optional", - "printedName": "Sentry.SentryClient?", - "children": [ - { - "kind": "TypeNominal", - "name": "SentryClient", - "printedName": "Sentry.SentryClient", - "usr": "c:objc(cs)SentryClient" - } - ], - "usr": "s:Sq" + "name": "SentryDsn", + "printedName": "Sentry.SentryDsn", + "usr": "c:objc(cs)SentryDsn" }, { "kind": "TypeNominal", - "name": "Options", - "printedName": "Sentry.Options", - "usr": "c:objc(cs)SentryOptions" + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" } ], "declKind": "Constructor", - "usr": "c:objc(cs)SentryClient(im)initWithOptions:", + "usr": "c:objc(cs)SentryDsn(im)initWithString:didFailWithError:", "moduleName": "Sentry", - "objc_name": "initWithOptions:", + "objc_name": "initWithString:didFailWithError:", "declAttributes": [ "ObjC", "Dynamic" ], + "throwing": true, "init_kind": "Designated" }, { "kind": "Function", - "name": "capture", - "printedName": "capture(event:)", - "children": [ - { - "kind": "TypeNominal", - "name": "SentryId", - "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" - }, - { - "kind": "TypeNominal", - "name": "Event", - "printedName": "Sentry.Event", - "usr": "c:objc(cs)SentryEvent" - } - ], - "declKind": "Func", - "usr": "c:objc(cs)SentryClient(im)captureEvent:", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "captureEvent:", - "declAttributes": [ - "DiscardableResult", - "ObjC", - "Dynamic" - ], - "funcSelfKind": "NonMutating" - }, - { - "kind": "Function", - "name": "capture", - "printedName": "capture(event:scope:)", - "children": [ - { - "kind": "TypeNominal", - "name": "SentryId", - "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" - }, - { - "kind": "TypeNominal", - "name": "Event", - "printedName": "Sentry.Event", - "usr": "c:objc(cs)SentryEvent" - }, - { - "kind": "TypeNominal", - "name": "Scope", - "printedName": "Sentry.Scope", - "usr": "c:objc(cs)SentryScope" - } - ], - "declKind": "Func", - "usr": "c:objc(cs)SentryClient(im)captureEvent:withScope:", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "captureEvent:withScope:", - "declAttributes": [ - "DiscardableResult", - "ObjC", - "Dynamic" - ], - "funcSelfKind": "NonMutating" - }, - { - "kind": "Function", - "name": "capture", - "printedName": "capture(error:)", - "children": [ - { - "kind": "TypeNominal", - "name": "SentryId", - "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" - }, - { - "kind": "TypeNominal", - "name": "Error", - "printedName": "any Swift.Error", - "usr": "s:s5ErrorP" - } - ], - "declKind": "Func", - "usr": "c:objc(cs)SentryClient(im)captureError:", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "captureError:", - "declAttributes": [ - "DiscardableResult", - "ObjC", - "Dynamic" - ], - "funcSelfKind": "NonMutating" - }, - { - "kind": "Function", - "name": "capture", - "printedName": "capture(error:scope:)", - "children": [ - { - "kind": "TypeNominal", - "name": "SentryId", - "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" - }, - { - "kind": "TypeNominal", - "name": "Error", - "printedName": "any Swift.Error", - "usr": "s:s5ErrorP" - }, - { - "kind": "TypeNominal", - "name": "Scope", - "printedName": "Sentry.Scope", - "usr": "c:objc(cs)SentryScope" - } - ], - "declKind": "Func", - "usr": "c:objc(cs)SentryClient(im)captureError:withScope:", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "captureError:withScope:", - "declAttributes": [ - "DiscardableResult", - "ObjC", - "Dynamic" - ], - "funcSelfKind": "NonMutating" - }, - { - "kind": "Function", - "name": "capture", - "printedName": "capture(exception:)", - "children": [ - { - "kind": "TypeNominal", - "name": "SentryId", - "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" - }, - { - "kind": "TypeNominal", - "name": "NSException", - "printedName": "Foundation.NSException", - "usr": "c:objc(cs)NSException" - } - ], - "declKind": "Func", - "usr": "c:objc(cs)SentryClient(im)captureException:", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "captureException:", - "declAttributes": [ - "DiscardableResult", - "ObjC", - "Dynamic" - ], - "funcSelfKind": "NonMutating" - }, - { - "kind": "Function", - "name": "capture", - "printedName": "capture(exception:scope:)", - "children": [ - { - "kind": "TypeNominal", - "name": "SentryId", - "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" - }, - { - "kind": "TypeNominal", - "name": "NSException", - "printedName": "Foundation.NSException", - "usr": "c:objc(cs)NSException" - }, - { - "kind": "TypeNominal", - "name": "Scope", - "printedName": "Sentry.Scope", - "usr": "c:objc(cs)SentryScope" - } - ], - "declKind": "Func", - "usr": "c:objc(cs)SentryClient(im)captureException:withScope:", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "captureException:withScope:", - "declAttributes": [ - "DiscardableResult", - "ObjC", - "Dynamic" - ], - "funcSelfKind": "NonMutating" - }, - { - "kind": "Function", - "name": "capture", - "printedName": "capture(message:)", + "name": "getHash", + "printedName": "getHash()", "children": [ - { - "kind": "TypeNominal", - "name": "SentryId", - "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" - }, { "kind": "TypeNominal", "name": "String", @@ -24555,10 +24251,10 @@ } ], "declKind": "Func", - "usr": "c:objc(cs)SentryClient(im)captureMessage:", + "usr": "c:objc(cs)SentryDsn(im)getHash", "moduleName": "Sentry", "isOpen": true, - "objc_name": "captureMessage:", + "objc_name": "getHash", "declAttributes": [ "DiscardableResult", "ObjC", @@ -24568,33 +24264,21 @@ }, { "kind": "Function", - "name": "capture", - "printedName": "capture(message:scope:)", + "name": "getEnvelopeEndpoint", + "printedName": "getEnvelopeEndpoint()", "children": [ { "kind": "TypeNominal", - "name": "SentryId", - "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" - }, - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - }, - { - "kind": "TypeNominal", - "name": "Scope", - "printedName": "Sentry.Scope", - "usr": "c:objc(cs)SentryScope" + "name": "URL", + "printedName": "Foundation.URL", + "usr": "s:10Foundation3URLV" } ], "declKind": "Func", - "usr": "c:objc(cs)SentryClient(im)captureMessage:withScope:", + "usr": "c:objc(cs)SentryDsn(im)getEnvelopeEndpoint", "moduleName": "Sentry", "isOpen": true, - "objc_name": "captureMessage:withScope:", + "objc_name": "getEnvelopeEndpoint", "declAttributes": [ "DiscardableResult", "ObjC", @@ -24603,351 +24287,36 @@ "funcSelfKind": "NonMutating" }, { - "kind": "Function", - "name": "capture", - "printedName": "capture(feedback:scope:)", + "kind": "Constructor", + "name": "init", + "printedName": "init()", "children": [ - { - "kind": "TypeNameAlias", - "name": "Void", - "printedName": "Swift.Void", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - } - ] - }, - { - "kind": "TypeNominal", - "name": "SentryFeedback", - "printedName": "Sentry.SentryFeedback", - "usr": "c:@M@Sentry@objc(cs)SentryFeedback" - }, { "kind": "TypeNominal", - "name": "Scope", - "printedName": "Sentry.Scope", - "usr": "c:objc(cs)SentryScope" - } - ], - "declKind": "Func", - "usr": "c:objc(cs)SentryClient(im)captureFeedback:withScope:", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "captureFeedback:withScope:", - "declAttributes": [ - "ObjC", - "Dynamic" - ], - "funcSelfKind": "NonMutating" - }, - { - "kind": "Function", - "name": "flush", - "printedName": "flush(timeout:)", - "children": [ - { - "kind": "TypeNameAlias", - "name": "Void", - "printedName": "Swift.Void", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - } - ] - }, - { - "kind": "TypeNameAlias", - "name": "TimeInterval", - "printedName": "Foundation.TimeInterval", - "children": [ - { - "kind": "TypeNominal", - "name": "Double", - "printedName": "Swift.Double", - "usr": "s:Sd" - } - ] - } - ], - "declKind": "Func", - "usr": "c:objc(cs)SentryClient(im)flush:", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "flush:", - "declAttributes": [ - "ObjC", - "Dynamic" - ], - "funcSelfKind": "NonMutating" - }, - { - "kind": "Function", - "name": "close", - "printedName": "close()", - "children": [ - { - "kind": "TypeNameAlias", - "name": "Void", - "printedName": "Swift.Void", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - } - ] + "name": "SentryDsn", + "printedName": "Sentry.SentryDsn", + "usr": "c:objc(cs)SentryDsn" } ], - "declKind": "Func", - "usr": "c:objc(cs)SentryClient(im)close", + "declKind": "Constructor", + "usr": "c:objc(cs)NSObject(im)init", "moduleName": "Sentry", - "isOpen": true, - "objc_name": "close", + "overriding": true, + "implicit": true, + "objc_name": "init", "declAttributes": [ + "Override", "ObjC", "Dynamic" ], - "funcSelfKind": "NonMutating" + "init_kind": "Designated" } ], "declKind": "Class", - "usr": "c:objc(cs)SentryClient", + "usr": "c:objc(cs)SentryDsn", "moduleName": "Sentry", "isOpen": true, - "objc_name": "SentryClient", - "declAttributes": [ - "ObjC", - "Dynamic" - ], - "superclassUsr": "c:objc(cs)NSObject", - "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": "SentryDsn", - "printedName": "SentryDsn", - "children": [ - { - "kind": "Var", - "name": "url", - "printedName": "url", - "children": [ - { - "kind": "TypeNominal", - "name": "URL", - "printedName": "Foundation.URL", - "usr": "s:10Foundation3URLV" - } - ], - "declKind": "Var", - "usr": "c:objc(cs)SentryDsn(py)url", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "url", - "declAttributes": [ - "ObjC", - "Dynamic" - ], - "accessors": [ - { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ - { - "kind": "TypeNominal", - "name": "URL", - "printedName": "Foundation.URL", - "usr": "s:10Foundation3URLV" - } - ], - "declKind": "Accessor", - "usr": "c:objc(cs)SentryDsn(im)url", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "url", - "declAttributes": [ - "DiscardableResult", - "ObjC", - "Dynamic" - ], - "accessorKind": "get" - } - ] - }, - { - "kind": "Constructor", - "name": "init", - "printedName": "init(string:)", - "children": [ - { - "kind": "TypeNominal", - "name": "SentryDsn", - "printedName": "Sentry.SentryDsn", - "usr": "c:objc(cs)SentryDsn" - }, - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "declKind": "Constructor", - "usr": "c:objc(cs)SentryDsn(im)initWithString:didFailWithError:", - "moduleName": "Sentry", - "objc_name": "initWithString:didFailWithError:", - "declAttributes": [ - "ObjC", - "Dynamic" - ], - "throwing": true, - "init_kind": "Designated" - }, - { - "kind": "Function", - "name": "getHash", - "printedName": "getHash()", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "declKind": "Func", - "usr": "c:objc(cs)SentryDsn(im)getHash", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "getHash", - "declAttributes": [ - "DiscardableResult", - "ObjC", - "Dynamic" - ], - "funcSelfKind": "NonMutating" - }, - { - "kind": "Function", - "name": "getEnvelopeEndpoint", - "printedName": "getEnvelopeEndpoint()", - "children": [ - { - "kind": "TypeNominal", - "name": "URL", - "printedName": "Foundation.URL", - "usr": "s:10Foundation3URLV" - } - ], - "declKind": "Func", - "usr": "c:objc(cs)SentryDsn(im)getEnvelopeEndpoint", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "getEnvelopeEndpoint", - "declAttributes": [ - "DiscardableResult", - "ObjC", - "Dynamic" - ], - "funcSelfKind": "NonMutating" - }, - { - "kind": "Constructor", - "name": "init", - "printedName": "init()", - "children": [ - { - "kind": "TypeNominal", - "name": "SentryDsn", - "printedName": "Sentry.SentryDsn", - "usr": "c:objc(cs)SentryDsn" - } - ], - "declKind": "Constructor", - "usr": "c:objc(cs)NSObject(im)init", - "moduleName": "Sentry", - "overriding": true, - "implicit": true, - "objc_name": "init", - "declAttributes": [ - "Override", - "ObjC", - "Dynamic" - ], - "init_kind": "Designated" - } - ], - "declKind": "Class", - "usr": "c:objc(cs)SentryDsn", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "SentryDsn", + "objc_name": "SentryDsn", "declAttributes": [ "ObjC", "Dynamic" @@ -26707,234 +26076,168 @@ }, { "kind": "TypeDecl", - "name": "SentryHub", - "printedName": "SentryHub", + "name": "SentryId", + "printedName": "SentryId", "children": [ { - "kind": "Constructor", - "name": "init", - "printedName": "init(client:andScope:)", + "kind": "Var", + "name": "empty", + "printedName": "empty", "children": [ { "kind": "TypeNominal", - "name": "SentryHub", - "printedName": "Sentry.SentryHub", - "usr": "c:objc(cs)SentryHub" - }, - { - "kind": "TypeNominal", - "name": "Optional", - "printedName": "Sentry.SentryClient?", - "children": [ - { - "kind": "TypeNominal", - "name": "SentryClient", - "printedName": "Sentry.SentryClient", - "usr": "c:objc(cs)SentryClient" - } - ], - "usr": "s:Sq" - }, - { - "kind": "TypeNominal", - "name": "Optional", - "printedName": "Sentry.Scope?", - "children": [ - { - "kind": "TypeNominal", - "name": "Scope", - "printedName": "Sentry.Scope", - "usr": "c:objc(cs)SentryScope" - } - ], - "usr": "s:Sq" + "name": "SentryId", + "printedName": "Sentry.SentryId", + "usr": "c:objc(cs)SentryId" } ], - "declKind": "Constructor", - "usr": "c:objc(cs)SentryHub(im)initWithClient:andScope:", + "declKind": "Var", + "usr": "c:objc(cs)SentryId(cpy)empty", "moduleName": "Sentry", - "objc_name": "initWithClient:andScope:", + "static": true, + "isOpen": true, + "objc_name": "empty", "declAttributes": [ "ObjC", "Dynamic" ], - "init_kind": "Designated" - }, - { - "kind": "Function", - "name": "startSession", - "printedName": "startSession()", - "children": [ + "accessors": [ { - "kind": "TypeNameAlias", - "name": "Void", - "printedName": "Swift.Void", + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", "children": [ { "kind": "TypeNominal", - "name": "Void", - "printedName": "()" + "name": "SentryId", + "printedName": "Sentry.SentryId", + "usr": "c:objc(cs)SentryId" } - ] + ], + "declKind": "Accessor", + "usr": "c:objc(cs)SentryId(cm)empty", + "moduleName": "Sentry", + "static": true, + "isOpen": true, + "objc_name": "empty", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "accessorKind": "get" } - ], - "declKind": "Func", - "usr": "c:objc(cs)SentryHub(im)startSession", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "startSession", - "declAttributes": [ - "ObjC", - "Dynamic" - ], - "funcSelfKind": "NonMutating" + ] }, { - "kind": "Function", - "name": "endSession", - "printedName": "endSession()", + "kind": "Var", + "name": "sentryIdString", + "printedName": "sentryIdString", "children": [ { - "kind": "TypeNameAlias", - "name": "Void", - "printedName": "Swift.Void", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - } - ] + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" } ], - "declKind": "Func", - "usr": "c:objc(cs)SentryHub(im)endSession", + "declKind": "Var", + "usr": "c:objc(cs)SentryId(py)sentryIdString", "moduleName": "Sentry", "isOpen": true, - "objc_name": "endSession", + "objc_name": "sentryIdString", "declAttributes": [ "ObjC", "Dynamic" ], - "funcSelfKind": "NonMutating" - }, - { - "kind": "Function", - "name": "endSession", - "printedName": "endSession(withTimestamp:)", - "children": [ + "accessors": [ { - "kind": "TypeNameAlias", - "name": "Void", - "printedName": "Swift.Void", + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", "children": [ { "kind": "TypeNominal", - "name": "Void", - "printedName": "()" + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" } - ] - }, - { - "kind": "TypeNominal", - "name": "Date", - "printedName": "Foundation.Date", - "usr": "s:10Foundation4DateV" + ], + "declKind": "Accessor", + "usr": "c:objc(cs)SentryId(im)sentryIdString", + "moduleName": "Sentry", + "isOpen": true, + "objc_name": "sentryIdString", + "declAttributes": [ + "DiscardableResult", + "ObjC", + "Dynamic" + ], + "accessorKind": "get" } - ], - "declKind": "Func", - "usr": "c:objc(cs)SentryHub(im)endSessionWithTimestamp:", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "endSessionWithTimestamp:", - "declAttributes": [ - "ObjC", - "Dynamic" - ], - "funcSelfKind": "NonMutating" + ] }, { - "kind": "Function", - "name": "capture", - "printedName": "capture(event:)", + "kind": "Constructor", + "name": "init", + "printedName": "init()", "children": [ { "kind": "TypeNominal", "name": "SentryId", "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" - }, - { - "kind": "TypeNominal", - "name": "Event", - "printedName": "Sentry.Event", - "usr": "c:objc(cs)SentryEvent" + "usr": "c:objc(cs)SentryId" } ], - "declKind": "Func", - "usr": "c:objc(cs)SentryHub(im)captureEvent:", + "declKind": "Constructor", + "usr": "c:objc(cs)SentryId(im)init", "moduleName": "Sentry", - "isOpen": true, - "objc_name": "captureEvent:", + "overriding": true, + "objc_name": "init", "declAttributes": [ - "DiscardableResult", + "Override", "ObjC", "Dynamic" ], - "funcSelfKind": "NonMutating" + "init_kind": "Designated" }, { - "kind": "Function", - "name": "capture", - "printedName": "capture(event:scope:)", + "kind": "Constructor", + "name": "init", + "printedName": "init(uuid:)", "children": [ { "kind": "TypeNominal", "name": "SentryId", "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" - }, - { - "kind": "TypeNominal", - "name": "Event", - "printedName": "Sentry.Event", - "usr": "c:objc(cs)SentryEvent" + "usr": "c:objc(cs)SentryId" }, { "kind": "TypeNominal", - "name": "Scope", - "printedName": "Sentry.Scope", - "usr": "c:objc(cs)SentryScope" + "name": "UUID", + "printedName": "Foundation.UUID", + "usr": "s:10Foundation4UUIDV" } ], - "declKind": "Func", - "usr": "c:objc(cs)SentryHub(im)captureEvent:withScope:", + "declKind": "Constructor", + "usr": "c:objc(cs)SentryId(im)initWithUuid:", "moduleName": "Sentry", - "isOpen": true, - "objc_name": "captureEvent:withScope:", + "objc_name": "initWithUuid:", "declAttributes": [ - "DiscardableResult", "ObjC", "Dynamic" ], - "funcSelfKind": "NonMutating" + "init_kind": "Designated" }, { - "kind": "Function", - "name": "startTransaction", - "printedName": "startTransaction(name:operation:)", + "kind": "Constructor", + "name": "init", + "printedName": "init(uuidString:)", "children": [ { "kind": "TypeNominal", - "name": "Span", - "printedName": "any Sentry.Span", - "usr": "c:objc(pl)SentrySpan" - }, - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" + "name": "SentryId", + "printedName": "Sentry.SentryId", + "usr": "c:objc(cs)SentryId" }, { "kind": "TypeNominal", @@ -26943,143 +26246,137 @@ "usr": "s:SS" } ], - "declKind": "Func", - "usr": "c:objc(cs)SentryHub(im)startTransactionWithName:operation:", + "declKind": "Constructor", + "usr": "c:objc(cs)SentryId(im)initWithUUIDString:", "moduleName": "Sentry", - "isOpen": true, - "objc_name": "startTransactionWithName:operation:", + "objc_name": "initWithUUIDString:", "declAttributes": [ - "DiscardableResult", "ObjC", "Dynamic" ], - "funcSelfKind": "NonMutating" + "init_kind": "Designated" }, { "kind": "Function", - "name": "startTransaction", - "printedName": "startTransaction(name:operation:bindToScope:)", + "name": "isEqual", + "printedName": "isEqual(_:)", "children": [ - { - "kind": "TypeNominal", - "name": "Span", - "printedName": "any Sentry.Span", - "usr": "c:objc(pl)SentrySpan" - }, - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - }, - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - }, { "kind": "TypeNominal", "name": "Bool", "printedName": "Swift.Bool", "usr": "s:Sb" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Any?", + "children": [ + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "usr": "s:Sq" } ], "declKind": "Func", - "usr": "c:objc(cs)SentryHub(im)startTransactionWithName:operation:bindToScope:", + "usr": "c:objc(cs)SentryId(im)isEqual:", "moduleName": "Sentry", + "overriding": true, "isOpen": true, - "objc_name": "startTransactionWithName:operation:bindToScope:", + "objc_name": "isEqual:", "declAttributes": [ - "DiscardableResult", - "ObjC", - "Dynamic" - ], - "funcSelfKind": "NonMutating" - }, - { - "kind": "Function", - "name": "startTransaction", - "printedName": "startTransaction(transactionContext:)", - "children": [ - { - "kind": "TypeNominal", - "name": "Span", - "printedName": "any Sentry.Span", - "usr": "c:objc(pl)SentrySpan" - }, - { - "kind": "TypeNominal", - "name": "TransactionContext", - "printedName": "Sentry.TransactionContext", - "usr": "c:objc(cs)SentryTransactionContext" - } - ], - "declKind": "Func", - "usr": "c:objc(cs)SentryHub(im)startTransactionWithContext:", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "startTransactionWithContext:", - "declAttributes": [ - "DiscardableResult", + "Override", "ObjC", "Dynamic" ], "funcSelfKind": "NonMutating" + } + ], + "declKind": "Class", + "usr": "c:objc(cs)SentryId", + "moduleName": "Sentry", + "isOpen": true, + "objc_name": "SentryId", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "superclassUsr": "c:objc(cs)NSObject", + "inheritsConvenienceInitializers": true, + "superclassNames": [ + "ObjectiveC.NSObject" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Copyable", + "printedName": "Copyable", + "usr": "s:s8CopyableP", + "mangledName": "$ss8CopyableP" }, { - "kind": "Function", - "name": "startTransaction", - "printedName": "startTransaction(transactionContext:bindToScope:)", - "children": [ - { - "kind": "TypeNominal", - "name": "Span", - "printedName": "any Sentry.Span", - "usr": "c:objc(pl)SentrySpan" - }, - { - "kind": "TypeNominal", - "name": "TransactionContext", - "printedName": "Sentry.TransactionContext", - "usr": "c:objc(cs)SentryTransactionContext" - }, - { - "kind": "TypeNominal", - "name": "Bool", - "printedName": "Swift.Bool", - "usr": "s:Sb" - } - ], - "declKind": "Func", - "usr": "c:objc(cs)SentryHub(im)startTransactionWithContext:bindToScope:", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "startTransactionWithContext:bindToScope:", - "declAttributes": [ - "DiscardableResult", - "ObjC", - "Dynamic" - ], - "funcSelfKind": "NonMutating" + "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": "SentryIntegrationProtocol", + "printedName": "SentryIntegrationProtocol", + "children": [ { "kind": "Function", - "name": "startTransaction", - "printedName": "startTransaction(transactionContext:bindToScope:customSamplingContext:)", + "name": "install", + "printedName": "install(with:)", "children": [ - { - "kind": "TypeNominal", - "name": "Span", - "printedName": "any Sentry.Span", - "usr": "c:objc(pl)SentrySpan" - }, - { - "kind": "TypeNominal", - "name": "TransactionContext", - "printedName": "Sentry.TransactionContext", - "usr": "c:objc(cs)SentryTransactionContext" - }, { "kind": "TypeNominal", "name": "Bool", @@ -27088,227 +26385,104 @@ }, { "kind": "TypeNominal", - "name": "Dictionary", - "printedName": "[Swift.String : Any]", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - }, - { - "kind": "TypeNominal", - "name": "ProtocolComposition", - "printedName": "Any" - } - ], - "usr": "s:SD" + "name": "Options", + "printedName": "Sentry.Options", + "usr": "c:objc(cs)SentryOptions" } ], "declKind": "Func", - "usr": "c:objc(cs)SentryHub(im)startTransactionWithContext:bindToScope:customSamplingContext:", + "usr": "c:objc(pl)SentryIntegrationProtocol(im)installWithOptions:", "moduleName": "Sentry", - "isOpen": true, - "objc_name": "startTransactionWithContext:bindToScope:customSamplingContext:", + "genericSig": "", + "protocolReq": true, + "objc_name": "installWithOptions:", "declAttributes": [ "DiscardableResult", "ObjC", "Dynamic" ], + "reqNewWitnessTableEntry": true, "funcSelfKind": "NonMutating" }, { "kind": "Function", - "name": "startTransaction", - "printedName": "startTransaction(transactionContext:customSamplingContext:)", + "name": "uninstall", + "printedName": "uninstall()", "children": [ { - "kind": "TypeNominal", - "name": "Span", - "printedName": "any Sentry.Span", - "usr": "c:objc(pl)SentrySpan" - }, - { - "kind": "TypeNominal", - "name": "TransactionContext", - "printedName": "Sentry.TransactionContext", - "usr": "c:objc(cs)SentryTransactionContext" - }, - { - "kind": "TypeNominal", - "name": "Dictionary", - "printedName": "[Swift.String : Any]", + "kind": "TypeNameAlias", + "name": "Void", + "printedName": "Swift.Void", "children": [ { "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - }, - { - "kind": "TypeNominal", - "name": "ProtocolComposition", - "printedName": "Any" + "name": "Void", + "printedName": "()" } - ], - "usr": "s:SD" - } - ], - "declKind": "Func", - "usr": "c:objc(cs)SentryHub(im)startTransactionWithContext:customSamplingContext:", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "startTransactionWithContext:customSamplingContext:", - "declAttributes": [ - "DiscardableResult", - "ObjC", - "Dynamic" - ], - "funcSelfKind": "NonMutating" - }, - { - "kind": "Function", - "name": "capture", - "printedName": "capture(error:)", - "children": [ - { - "kind": "TypeNominal", - "name": "SentryId", - "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" - }, - { - "kind": "TypeNominal", - "name": "Error", - "printedName": "any Swift.Error", - "usr": "s:s5ErrorP" + ] } ], "declKind": "Func", - "usr": "c:objc(cs)SentryHub(im)captureError:", + "usr": "c:objc(pl)SentryIntegrationProtocol(im)uninstall", "moduleName": "Sentry", - "isOpen": true, - "objc_name": "captureError:", + "genericSig": "", + "protocolReq": true, + "objc_name": "uninstall", "declAttributes": [ - "DiscardableResult", "ObjC", "Dynamic" ], + "reqNewWitnessTableEntry": true, "funcSelfKind": "NonMutating" - }, + } + ], + "declKind": "Protocol", + "usr": "c:objc(pl)SentryIntegrationProtocol", + "moduleName": "Sentry", + "genericSig": "", + "objc_name": "SentryIntegrationProtocol", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "conformances": [ { - "kind": "Function", - "name": "capture", - "printedName": "capture(error:scope:)", - "children": [ - { - "kind": "TypeNominal", - "name": "SentryId", - "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" - }, - { - "kind": "TypeNominal", - "name": "Error", - "printedName": "any Swift.Error", - "usr": "s:s5ErrorP" - }, - { - "kind": "TypeNominal", - "name": "Scope", - "printedName": "Sentry.Scope", - "usr": "c:objc(cs)SentryScope" - } - ], - "declKind": "Func", - "usr": "c:objc(cs)SentryHub(im)captureError:withScope:", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "captureError:withScope:", - "declAttributes": [ - "DiscardableResult", - "ObjC", - "Dynamic" - ], - "funcSelfKind": "NonMutating" + "kind": "Conformance", + "name": "Escapable", + "printedName": "Escapable", + "usr": "s:s9EscapableP", + "mangledName": "$ss9EscapableP" }, { - "kind": "Function", - "name": "capture", - "printedName": "capture(exception:)", - "children": [ - { - "kind": "TypeNominal", - "name": "SentryId", - "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" - }, - { - "kind": "TypeNominal", - "name": "NSException", - "printedName": "Foundation.NSException", - "usr": "c:objc(cs)NSException" - } - ], - "declKind": "Func", - "usr": "c:objc(cs)SentryHub(im)captureException:", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "captureException:", - "declAttributes": [ - "DiscardableResult", - "ObjC", - "Dynamic" - ], - "funcSelfKind": "NonMutating" + "kind": "Conformance", + "name": "Copyable", + "printedName": "Copyable", + "usr": "s:s8CopyableP", + "mangledName": "$ss8CopyableP" }, { - "kind": "Function", - "name": "capture", - "printedName": "capture(exception:scope:)", - "children": [ - { - "kind": "TypeNominal", - "name": "SentryId", - "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" - }, - { - "kind": "TypeNominal", - "name": "NSException", - "printedName": "Foundation.NSException", - "usr": "c:objc(cs)NSException" - }, - { - "kind": "TypeNominal", - "name": "Scope", - "printedName": "Sentry.Scope", - "usr": "c:objc(cs)SentryScope" - } - ], - "declKind": "Func", - "usr": "c:objc(cs)SentryHub(im)captureException:withScope:", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "captureException:withScope:", - "declAttributes": [ - "DiscardableResult", - "ObjC", - "Dynamic" - ], - "funcSelfKind": "NonMutating" - }, + "kind": "Conformance", + "name": "NSObjectProtocol", + "printedName": "NSObjectProtocol", + "usr": "c:objc(pl)NSObject" + } + ] + }, + { + "kind": "TypeDecl", + "name": "SentryMessage", + "printedName": "SentryMessage", + "children": [ { - "kind": "Function", - "name": "capture", - "printedName": "capture(message:)", + "kind": "Constructor", + "name": "init", + "printedName": "init(formatted:)", "children": [ { "kind": "TypeNominal", - "name": "SentryId", - "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" + "name": "SentryMessage", + "printedName": "Sentry.SentryMessage", + "usr": "c:objc(cs)SentryMessage" }, { "kind": "TypeNominal", @@ -27317,110 +26491,130 @@ "usr": "s:SS" } ], - "declKind": "Func", - "usr": "c:objc(cs)SentryHub(im)captureMessage:", + "declKind": "Constructor", + "usr": "c:objc(cs)SentryMessage(im)initWithFormatted:", "moduleName": "Sentry", - "isOpen": true, - "objc_name": "captureMessage:", + "objc_name": "initWithFormatted:", "declAttributes": [ - "DiscardableResult", "ObjC", "Dynamic" ], - "funcSelfKind": "NonMutating" + "init_kind": "Designated" }, { - "kind": "Function", - "name": "capture", - "printedName": "capture(message:scope:)", + "kind": "Var", + "name": "formatted", + "printedName": "formatted", "children": [ - { - "kind": "TypeNominal", - "name": "SentryId", - "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" - }, { "kind": "TypeNominal", "name": "String", "printedName": "Swift.String", "usr": "s:SS" - }, - { - "kind": "TypeNominal", - "name": "Scope", - "printedName": "Sentry.Scope", - "usr": "c:objc(cs)SentryScope" } ], - "declKind": "Func", - "usr": "c:objc(cs)SentryHub(im)captureMessage:withScope:", + "declKind": "Var", + "usr": "c:objc(cs)SentryMessage(py)formatted", "moduleName": "Sentry", "isOpen": true, - "objc_name": "captureMessage:withScope:", + "objc_name": "formatted", "declAttributes": [ - "DiscardableResult", "ObjC", "Dynamic" ], - "funcSelfKind": "NonMutating" + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "c:objc(cs)SentryMessage(im)formatted", + "moduleName": "Sentry", + "isOpen": true, + "objc_name": "formatted", + "declAttributes": [ + "DiscardableResult", + "ObjC", + "Dynamic" + ], + "accessorKind": "get" + } + ] }, { - "kind": "Function", - "name": "capture", - "printedName": "capture(_:)", + "kind": "Var", + "name": "message", + "printedName": "message", "children": [ { - "kind": "TypeNameAlias", - "name": "Void", - "printedName": "Swift.Void", + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", "children": [ { "kind": "TypeNominal", - "name": "Void", - "printedName": "()" + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" } - ] - }, - { - "kind": "TypeNominal", - "name": "SentryFeedback", - "printedName": "Sentry.SentryFeedback", - "usr": "c:@M@Sentry@objc(cs)SentryFeedback" + ], + "usr": "s:Sq" } ], - "declKind": "Func", - "usr": "c:objc(cs)SentryHub(im)captureFeedback:", + "declKind": "Var", + "usr": "c:objc(cs)SentryMessage(py)message", "moduleName": "Sentry", "isOpen": true, - "objc_name": "captureFeedback:", + "objc_name": "message", "declAttributes": [ "ObjC", "Dynamic" ], - "funcSelfKind": "NonMutating" - }, - { - "kind": "Function", - "name": "configureScope", - "printedName": "configureScope(_:)", - "children": [ + "accessors": [ { - "kind": "TypeNameAlias", - "name": "Void", - "printedName": "Swift.Void", + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", "children": [ { "kind": "TypeNominal", - "name": "Void", - "printedName": "()" + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" } - ] + ], + "declKind": "Accessor", + "usr": "c:objc(cs)SentryMessage(im)message", + "moduleName": "Sentry", + "isOpen": true, + "objc_name": "message", + "declAttributes": [ + "DiscardableResult", + "ObjC", + "Dynamic" + ], + "accessorKind": "get" }, { - "kind": "TypeFunc", - "name": "Function", - "printedName": "(Sentry.Scope) -> Swift.Void", + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", "children": [ { "kind": "TypeNameAlias", @@ -27436,108 +26630,65 @@ }, { "kind": "TypeNominal", - "name": "Scope", - "printedName": "Sentry.Scope", - "usr": "c:objc(cs)SentryScope" - } - ] - } - ], - "declKind": "Func", - "usr": "c:objc(cs)SentryHub(im)configureScope:", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "configureScope:", - "declAttributes": [ - "ObjC", - "Dynamic" - ], - "funcSelfKind": "NonMutating" - }, - { - "kind": "Function", - "name": "add", - "printedName": "add(_:)", - "children": [ - { - "kind": "TypeNameAlias", - "name": "Void", - "printedName": "Swift.Void", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" } - ] - }, - { - "kind": "TypeNominal", - "name": "Breadcrumb", - "printedName": "Sentry.Breadcrumb", - "usr": "c:objc(cs)SentryBreadcrumb" + ], + "declKind": "Accessor", + "usr": "c:objc(cs)SentryMessage(im)setMessage:", + "moduleName": "Sentry", + "isOpen": true, + "objc_name": "setMessage:", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "accessorKind": "set" } - ], - "declKind": "Func", - "usr": "c:objc(cs)SentryHub(im)addBreadcrumb:", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "addBreadcrumb:", - "declAttributes": [ - "ObjC", - "Dynamic" - ], - "funcSelfKind": "NonMutating" + ] }, { - "kind": "Function", - "name": "getClient", - "printedName": "getClient()", + "kind": "Var", + "name": "params", + "printedName": "params", "children": [ { "kind": "TypeNominal", "name": "Optional", - "printedName": "Sentry.SentryClient?", + "printedName": "[Swift.String]?", "children": [ { "kind": "TypeNominal", - "name": "SentryClient", - "printedName": "Sentry.SentryClient", - "usr": "c:objc(cs)SentryClient" + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" } ], "usr": "s:Sq" } ], - "declKind": "Func", - "usr": "c:objc(cs)SentryHub(im)getClient", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "getClient", - "declAttributes": [ - "DiscardableResult", - "ObjC", - "Dynamic" - ], - "funcSelfKind": "NonMutating" - }, - { - "kind": "Var", - "name": "scope", - "printedName": "scope", - "children": [ - { - "kind": "TypeNominal", - "name": "Scope", - "printedName": "Sentry.Scope", - "usr": "c:objc(cs)SentryScope" - } - ], "declKind": "Var", - "usr": "c:objc(cs)SentryHub(py)scope", + "usr": "c:objc(cs)SentryMessage(py)params", "moduleName": "Sentry", "isOpen": true, - "objc_name": "scope", + "objc_name": "params", "declAttributes": [ "ObjC", "Dynamic" @@ -27550,304 +26701,98 @@ "children": [ { "kind": "TypeNominal", - "name": "Scope", - "printedName": "Sentry.Scope", - "usr": "c:objc(cs)SentryScope" + "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)SentryHub(im)scope", + "usr": "c:objc(cs)SentryMessage(im)params", "moduleName": "Sentry", "isOpen": true, - "objc_name": "scope", + "objc_name": "params", "declAttributes": [ "DiscardableResult", "ObjC", "Dynamic" ], "accessorKind": "get" - } - ] - }, - { - "kind": "Function", - "name": "bindClient", - "printedName": "bindClient(_:)", - "children": [ - { - "kind": "TypeNameAlias", - "name": "Void", - "printedName": "Swift.Void", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - } - ] }, { - "kind": "TypeNominal", - "name": "Optional", - "printedName": "Sentry.SentryClient?", + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", "children": [ { - "kind": "TypeNominal", - "name": "SentryClient", - "printedName": "Sentry.SentryClient", - "usr": "c:objc(cs)SentryClient" - } - ], - "usr": "s:Sq" - } - ], - "declKind": "Func", - "usr": "c:objc(cs)SentryHub(im)bindClient:", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "bindClient:", - "declAttributes": [ - "ObjC", - "Dynamic" - ], - "funcSelfKind": "NonMutating" - }, - { - "kind": "Function", - "name": "hasIntegration", - "printedName": "hasIntegration(_:)", - "children": [ - { - "kind": "TypeNominal", - "name": "Bool", - "printedName": "Swift.Bool", - "usr": "s:Sb" - }, - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "declKind": "Func", - "usr": "c:objc(cs)SentryHub(im)hasIntegration:", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "hasIntegration:", - "declAttributes": [ - "DiscardableResult", - "ObjC", - "Dynamic" - ], - "funcSelfKind": "NonMutating" - }, - { - "kind": "Function", - "name": "isIntegrationInstalled", - "printedName": "isIntegrationInstalled(_:)", - "children": [ - { - "kind": "TypeNominal", - "name": "Bool", - "printedName": "Swift.Bool", - "usr": "s:Sb" - }, - { - "kind": "TypeNameAlias", - "name": "AnyClass", - "printedName": "Swift.AnyClass", - "children": [ + "kind": "TypeNameAlias", + "name": "Void", + "printedName": "Swift.Void", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ] + }, { "kind": "TypeNominal", - "name": "ExistentialMetatype", - "printedName": "any Swift.AnyObject.Type", + "name": "Optional", + "printedName": "[Swift.String]?", "children": [ { - "kind": "TypeNameAlias", - "name": "AnyObject", - "printedName": "Swift.AnyObject", + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", "children": [ { - "kind": "TypeNameAlias", - "name": "AnyObject", - "printedName": "Builtin.AnyObject", - "children": [ - { - "kind": "TypeNominal", - "name": "ProtocolComposition", - "printedName": "AnyObject" - } - ] + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" } - ] + ], + "usr": "s:Sa" } - ] - } - ] - } - ], - "declKind": "Func", - "usr": "c:objc(cs)SentryHub(im)isIntegrationInstalled:", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "isIntegrationInstalled:", - "declAttributes": [ - "DiscardableResult", - "ObjC", - "Dynamic" - ], - "funcSelfKind": "NonMutating" - }, - { - "kind": "Function", - "name": "setUser", - "printedName": "setUser(_:)", - "children": [ - { - "kind": "TypeNameAlias", - "name": "Void", - "printedName": "Swift.Void", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - } - ] - }, - { - "kind": "TypeNominal", - "name": "Optional", - "printedName": "Sentry.User?", - "children": [ - { - "kind": "TypeNominal", - "name": "User", - "printedName": "Sentry.User", - "usr": "c:objc(cs)SentryUser" + ], + "usr": "s:Sq" } ], - "usr": "s:Sq" - } - ], - "declKind": "Func", - "usr": "c:objc(cs)SentryHub(im)setUser:", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "setUser:", - "declAttributes": [ - "ObjC", - "Dynamic" - ], - "funcSelfKind": "NonMutating" - }, - { - "kind": "Function", - "name": "reportFullyDisplayed", - "printedName": "reportFullyDisplayed()", - "children": [ - { - "kind": "TypeNameAlias", - "name": "Void", - "printedName": "Swift.Void", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - } - ] - } - ], - "declKind": "Func", - "usr": "c:objc(cs)SentryHub(im)reportFullyDisplayed", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "reportFullyDisplayed", - "declAttributes": [ - "ObjC", - "Dynamic" - ], - "funcSelfKind": "NonMutating" - }, - { - "kind": "Function", - "name": "flush", - "printedName": "flush(timeout:)", - "children": [ - { - "kind": "TypeNameAlias", - "name": "Void", - "printedName": "Swift.Void", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - } - ] - }, - { - "kind": "TypeNameAlias", - "name": "TimeInterval", - "printedName": "Foundation.TimeInterval", - "children": [ - { - "kind": "TypeNominal", - "name": "Double", - "printedName": "Swift.Double", - "usr": "s:Sd" - } - ] - } - ], - "declKind": "Func", - "usr": "c:objc(cs)SentryHub(im)flush:", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "flush:", - "declAttributes": [ - "ObjC", - "Dynamic" - ], - "funcSelfKind": "NonMutating" - }, - { - "kind": "Function", - "name": "close", - "printedName": "close()", - "children": [ - { - "kind": "TypeNameAlias", - "name": "Void", - "printedName": "Swift.Void", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - } - ] + "declKind": "Accessor", + "usr": "c:objc(cs)SentryMessage(im)setParams:", + "moduleName": "Sentry", + "isOpen": true, + "objc_name": "setParams:", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "accessorKind": "set" } - ], - "declKind": "Func", - "usr": "c:objc(cs)SentryHub(im)close", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "close", - "declAttributes": [ - "ObjC", - "Dynamic" - ], - "funcSelfKind": "NonMutating" + ] } ], "declKind": "Class", - "usr": "c:objc(cs)SentryHub", + "usr": "c:objc(cs)SentryMessage", "moduleName": "Sentry", "isOpen": true, - "objc_name": "SentryHub", + "objc_name": "SentryMessage", "declAttributes": [ "ObjC", "Dynamic" @@ -27858,6 +26803,12 @@ "ObjectiveC.NSObject" ], "conformances": [ + { + "kind": "Conformance", + "name": "SentrySerializable", + "printedName": "SentrySerializable", + "usr": "c:objc(pl)SentrySerializable" + }, { "kind": "Conformance", "name": "Copyable", @@ -27917,540 +26868,41 @@ }, { "kind": "TypeDecl", - "name": "SentryIntegrationProtocol", - "printedName": "SentryIntegrationProtocol", + "name": "SentryNSError", + "printedName": "SentryNSError", "children": [ { - "kind": "Function", - "name": "install", - "printedName": "install(with:)", + "kind": "Var", + "name": "domain", + "printedName": "domain", "children": [ { "kind": "TypeNominal", - "name": "Bool", - "printedName": "Swift.Bool", - "usr": "s:Sb" - }, - { - "kind": "TypeNominal", - "name": "Options", - "printedName": "Sentry.Options", - "usr": "c:objc(cs)SentryOptions" + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" } ], - "declKind": "Func", - "usr": "c:objc(pl)SentryIntegrationProtocol(im)installWithOptions:", + "declKind": "Var", + "usr": "c:objc(cs)SentryNSError(py)domain", "moduleName": "Sentry", - "genericSig": "", - "protocolReq": true, - "objc_name": "installWithOptions:", + "isOpen": true, + "objc_name": "domain", "declAttributes": [ - "DiscardableResult", "ObjC", "Dynamic" ], - "reqNewWitnessTableEntry": true, - "funcSelfKind": "NonMutating" - }, - { - "kind": "Function", - "name": "uninstall", - "printedName": "uninstall()", - "children": [ + "accessors": [ { - "kind": "TypeNameAlias", - "name": "Void", - "printedName": "Swift.Void", + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", "children": [ { "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - } - ] - } - ], - "declKind": "Func", - "usr": "c:objc(pl)SentryIntegrationProtocol(im)uninstall", - "moduleName": "Sentry", - "genericSig": "", - "protocolReq": true, - "objc_name": "uninstall", - "declAttributes": [ - "ObjC", - "Dynamic" - ], - "reqNewWitnessTableEntry": true, - "funcSelfKind": "NonMutating" - } - ], - "declKind": "Protocol", - "usr": "c:objc(pl)SentryIntegrationProtocol", - "moduleName": "Sentry", - "genericSig": "", - "objc_name": "SentryIntegrationProtocol", - "declAttributes": [ - "ObjC", - "Dynamic" - ], - "conformances": [ - { - "kind": "Conformance", - "name": "Escapable", - "printedName": "Escapable", - "usr": "s:s9EscapableP", - "mangledName": "$ss9EscapableP" - }, - { - "kind": "Conformance", - "name": "Copyable", - "printedName": "Copyable", - "usr": "s:s8CopyableP", - "mangledName": "$ss8CopyableP" - }, - { - "kind": "Conformance", - "name": "NSObjectProtocol", - "printedName": "NSObjectProtocol", - "usr": "c:objc(pl)NSObject" - } - ] - }, - { - "kind": "TypeDecl", - "name": "SentryMessage", - "printedName": "SentryMessage", - "children": [ - { - "kind": "Constructor", - "name": "init", - "printedName": "init(formatted:)", - "children": [ - { - "kind": "TypeNominal", - "name": "SentryMessage", - "printedName": "Sentry.SentryMessage", - "usr": "c:objc(cs)SentryMessage" - }, - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "declKind": "Constructor", - "usr": "c:objc(cs)SentryMessage(im)initWithFormatted:", - "moduleName": "Sentry", - "objc_name": "initWithFormatted:", - "declAttributes": [ - "ObjC", - "Dynamic" - ], - "init_kind": "Designated" - }, - { - "kind": "Var", - "name": "formatted", - "printedName": "formatted", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "declKind": "Var", - "usr": "c:objc(cs)SentryMessage(py)formatted", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "formatted", - "declAttributes": [ - "ObjC", - "Dynamic" - ], - "accessors": [ - { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "declKind": "Accessor", - "usr": "c:objc(cs)SentryMessage(im)formatted", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "formatted", - "declAttributes": [ - "DiscardableResult", - "ObjC", - "Dynamic" - ], - "accessorKind": "get" - } - ] - }, - { - "kind": "Var", - "name": "message", - "printedName": "message", - "children": [ - { - "kind": "TypeNominal", - "name": "Optional", - "printedName": "Swift.String?", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "usr": "s:Sq" - } - ], - "declKind": "Var", - "usr": "c:objc(cs)SentryMessage(py)message", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "message", - "declAttributes": [ - "ObjC", - "Dynamic" - ], - "accessors": [ - { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ - { - "kind": "TypeNominal", - "name": "Optional", - "printedName": "Swift.String?", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "usr": "s:Sq" - } - ], - "declKind": "Accessor", - "usr": "c:objc(cs)SentryMessage(im)message", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "message", - "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": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "usr": "s:Sq" - } - ], - "declKind": "Accessor", - "usr": "c:objc(cs)SentryMessage(im)setMessage:", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "setMessage:", - "declAttributes": [ - "ObjC", - "Dynamic" - ], - "accessorKind": "set" - } - ] - }, - { - "kind": "Var", - "name": "params", - "printedName": "params", - "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)SentryMessage(py)params", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "params", - "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)SentryMessage(im)params", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "params", - "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)SentryMessage(im)setParams:", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "setParams:", - "declAttributes": [ - "ObjC", - "Dynamic" - ], - "accessorKind": "set" - } - ] - } - ], - "declKind": "Class", - "usr": "c:objc(cs)SentryMessage", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "SentryMessage", - "declAttributes": [ - "ObjC", - "Dynamic" - ], - "superclassUsr": "c:objc(cs)NSObject", - "inheritsConvenienceInitializers": true, - "superclassNames": [ - "ObjectiveC.NSObject" - ], - "conformances": [ - { - "kind": "Conformance", - "name": "SentrySerializable", - "printedName": "SentrySerializable", - "usr": "c:objc(pl)SentrySerializable" - }, - { - "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": "SentryNSError", - "printedName": "SentryNSError", - "children": [ - { - "kind": "Var", - "name": "domain", - "printedName": "domain", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "declKind": "Var", - "usr": "c:objc(cs)SentryNSError(py)domain", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "domain", - "declAttributes": [ - "ObjC", - "Dynamic" - ], - "accessors": [ - { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" } ], "declKind": "Accessor", @@ -33986,7 +32438,7 @@ "kind": "TypeNominal", "name": "SentryId", "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" + "usr": "c:objc(cs)SentryId" } ], "declKind": "Var", @@ -34913,7 +33365,7 @@ "kind": "TypeNominal", "name": "SentryId", "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" + "usr": "c:objc(cs)SentryId" } ], "declKind": "Var", @@ -34935,7 +33387,7 @@ "kind": "TypeNominal", "name": "SentryId", "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" + "usr": "c:objc(cs)SentryId" } ], "declKind": "Accessor", @@ -35384,7 +33836,7 @@ "kind": "TypeNominal", "name": "SentryId", "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" + "usr": "c:objc(cs)SentryId" }, { "kind": "TypeNominal", @@ -35444,7 +33896,7 @@ "kind": "TypeNominal", "name": "SentryId", "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" + "usr": "c:objc(cs)SentryId" }, { "kind": "TypeNominal", @@ -35858,7 +34310,7 @@ "kind": "TypeNominal", "name": "SentryId", "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" + "usr": "c:objc(cs)SentryId" } ], "declKind": "Var", @@ -35880,7 +34332,7 @@ "kind": "TypeNominal", "name": "SentryId", "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" + "usr": "c:objc(cs)SentryId" } ], "declKind": "Accessor", @@ -36408,7 +34860,7 @@ "kind": "TypeNominal", "name": "SentryId", "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" + "usr": "c:objc(cs)SentryId" }, { "kind": "TypeNominal", @@ -36526,7 +34978,7 @@ "kind": "TypeNominal", "name": "SentryId", "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" + "usr": "c:objc(cs)SentryId" }, { "kind": "TypeNominal", @@ -36749,7 +35201,7 @@ "kind": "TypeNominal", "name": "SentryId", "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" + "usr": "c:objc(cs)SentryId" }, { "kind": "TypeNominal", @@ -36924,7 +35376,7 @@ "kind": "TypeNominal", "name": "SentryId", "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" + "usr": "c:objc(cs)SentryId" } ], "declKind": "Var", @@ -36946,7 +35398,7 @@ "kind": "TypeNominal", "name": "SentryId", "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" + "usr": "c:objc(cs)SentryId" } ], "declKind": "Accessor", @@ -37074,7 +35526,7 @@ "kind": "TypeNominal", "name": "SentryId", "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" + "usr": "c:objc(cs)SentryId" }, { "kind": "TypeNominal", @@ -38020,7 +36472,7 @@ "kind": "TypeNominal", "name": "SentryId", "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" + "usr": "c:objc(cs)SentryId" }, { "kind": "TypeNominal", @@ -38170,7 +36622,7 @@ "kind": "TypeNominal", "name": "SentryId", "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" + "usr": "c:objc(cs)SentryId" }, { "kind": "TypeNominal", @@ -38233,7 +36685,7 @@ "kind": "TypeNominal", "name": "SentryId", "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" + "usr": "c:objc(cs)SentryId" }, { "kind": "TypeNominal", @@ -42137,7 +40589,7 @@ "kind": "TypeNominal", "name": "SentryId", "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" + "usr": "c:objc(cs)SentryId" } ], "hasDefaultArg": true, @@ -42169,7 +40621,7 @@ ], "declKind": "Constructor", "usr": "c:@M@Sentry@objc(cs)SentryFeedback(im)initWithMessage:name:email:source:associatedEventId:attachments:", - "mangledName": "$s6Sentry0A8FeedbackC7message4name5email6source17associatedEventId11attachmentsACSS_SSSgAjC0aB6SourceOAA0aI0CSgSay10Foundation4DataVGSgtcfc", + "mangledName": "$s6Sentry0A8FeedbackC7message4name5email6source17associatedEventId11attachmentsACSS_SSSgAjC0aB6SourceOSo0aI0CSgSay10Foundation4DataVGSgtcfc", "moduleName": "Sentry", "objc_name": "initWithMessage:name:email:source:associatedEventId:attachments:", "declAttributes": [ @@ -42953,12 +41405,12 @@ "kind": "TypeNominal", "name": "SentryId", "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" + "usr": "c:objc(cs)SentryId" } ], "declKind": "Var", "usr": "c:@M@Sentry@objc(cs)SentryLog(py)traceId", - "mangledName": "$s6Sentry0A3LogC7traceIdAA0aD0Cvp", + "mangledName": "$s6Sentry0A3LogC7traceIdSo0aD0Cvp", "moduleName": "Sentry", "declAttributes": [ "Final", @@ -42976,12 +41428,12 @@ "kind": "TypeNominal", "name": "SentryId", "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" + "usr": "c:objc(cs)SentryId" } ], "declKind": "Accessor", "usr": "c:@M@Sentry@objc(cs)SentryLog(im)traceId", - "mangledName": "$s6Sentry0A3LogC7traceIdAA0aD0Cvg", + "mangledName": "$s6Sentry0A3LogC7traceIdSo0aD0Cvg", "moduleName": "Sentry", "implicit": true, "declAttributes": [ @@ -43004,12 +41456,12 @@ "kind": "TypeNominal", "name": "SentryId", "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" + "usr": "c:objc(cs)SentryId" } ], "declKind": "Accessor", "usr": "c:@M@Sentry@objc(cs)SentryLog(im)setTraceId:", - "mangledName": "$s6Sentry0A3LogC7traceIdAA0aD0Cvs", + "mangledName": "$s6Sentry0A3LogC7traceIdSo0aD0Cvs", "moduleName": "Sentry", "implicit": true, "declAttributes": [ @@ -45003,6 +43455,7 @@ "ObjC" ], "superclassUsr": "c:objc(cs)NSObject", + "hasMissingDesignatedInitializers": true, "inheritsConvenienceInitializers": true, "superclassNames": [ "ObjectiveC.NSObject" @@ -49342,83 +47795,1738 @@ ], "accessorKind": "set" } - ] + ] + }, + { + "kind": "Var", + "name": "profileAppStarts", + "printedName": "profileAppStarts", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "c:@M@Sentry@objc(cs)SentryProfileOptions(py)profileAppStarts", + "mangledName": "$s6Sentry0A14ProfileOptionsC16profileAppStartsSbvp", + "moduleName": "Sentry", + "declAttributes": [ + "Final", + "ObjC", + "HasStorage" + ], + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "c:@M@Sentry@objc(cs)SentryProfileOptions(im)profileAppStarts", + "mangledName": "$s6Sentry0A14ProfileOptionsC16profileAppStartsSbvg", + "moduleName": "Sentry", + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "c:@M@Sentry@objc(cs)SentryProfileOptions(im)setProfileAppStarts:", + "mangledName": "$s6Sentry0A14ProfileOptionsC16profileAppStartsSbvs", + "moduleName": "Sentry", + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "set" + } + ] + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "SentryProfileOptions", + "printedName": "Sentry.SentryProfileOptions", + "usr": "c:@M@Sentry@objc(cs)SentryProfileOptions" + } + ], + "declKind": "Constructor", + "usr": "c:@M@Sentry@objc(cs)SentryProfileOptions(im)init", + "mangledName": "$s6Sentry0A14ProfileOptionsCACycfc", + "moduleName": "Sentry", + "overriding": true, + "objc_name": "init", + "declAttributes": [ + "ObjC", + "Dynamic", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "c:@M@Sentry@objc(cs)SentryProfileOptions", + "mangledName": "$s6Sentry0A14ProfileOptionsC", + "moduleName": "Sentry", + "declAttributes": [ + "Final", + "ObjCMembers", + "ObjC" + ], + "superclassUsr": "c:objc(cs)NSObject", + "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": "SentrySDK", + "printedName": "SentrySDK", + "children": [ + { + "kind": "Var", + "name": "span", + "printedName": "span", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "(any Sentry.Span)?", + "children": [ + { + "kind": "TypeNominal", + "name": "Span", + "printedName": "any Sentry.Span", + "usr": "c:objc(pl)SentrySpan" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cpy)span", + "mangledName": "$s6Sentry0A3SDKC4spanSo0A4Span_pSgvpZ", + "moduleName": "Sentry", + "static": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "(any Sentry.Span)?", + "children": [ + { + "kind": "TypeNominal", + "name": "Span", + "printedName": "any Sentry.Span", + "usr": "c:objc(pl)SentrySpan" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)span", + "mangledName": "$s6Sentry0A3SDKC4spanSo0A4Span_pSgvgZ", + "moduleName": "Sentry", + "static": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "isEnabled", + "printedName": "isEnabled", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cpy)isEnabled", + "mangledName": "$s6Sentry0A3SDKC9isEnabledSbvpZ", + "moduleName": "Sentry", + "static": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)isEnabled", + "mangledName": "$s6Sentry0A3SDKC9isEnabledSbvgZ", + "moduleName": "Sentry", + "static": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "replay", + "printedName": "replay", + "children": [ + { + "kind": "TypeNominal", + "name": "SentryReplayApi", + "printedName": "Sentry.SentryReplayApi", + "usr": "c:objc(cs)SentryReplayApi" + } + ], + "declKind": "Var", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cpy)replay", + "mangledName": "$s6Sentry0A3SDKC6replaySo0A9ReplayApiCvpZ", + "moduleName": "Sentry", + "static": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "SentryReplayApi", + "printedName": "Sentry.SentryReplayApi", + "usr": "c:objc(cs)SentryReplayApi" + } + ], + "declKind": "Accessor", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)replay", + "mangledName": "$s6Sentry0A3SDKC6replaySo0A9ReplayApiCvgZ", + "moduleName": "Sentry", + "static": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "logger", + "printedName": "logger", + "children": [ + { + "kind": "TypeNominal", + "name": "SentryLogger", + "printedName": "Sentry.SentryLogger", + "usr": "c:@M@Sentry@objc(cs)SentryLogger" + } + ], + "declKind": "Var", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cpy)logger", + "mangledName": "$s6Sentry0A3SDKC6loggerAA0A6LoggerCvpZ", + "moduleName": "Sentry", + "static": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "SentryLogger", + "printedName": "Sentry.SentryLogger", + "usr": "c:@M@Sentry@objc(cs)SentryLogger" + } + ], + "declKind": "Accessor", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)logger", + "mangledName": "$s6Sentry0A3SDKC6loggerAA0A6LoggerCvgZ", + "moduleName": "Sentry", + "static": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "start", + "printedName": "start(options:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Options", + "printedName": "Sentry.Options", + "usr": "c:objc(cs)SentryOptions" + } + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)startWithOptions:", + "mangledName": "$s6Sentry0A3SDKC5start7optionsySo0A7OptionsC_tFZ", + "moduleName": "Sentry", + "static": true, + "objc_name": "startWithOptions:", + "declAttributes": [ + "Final", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "start", + "printedName": "start(configureOptions:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(Sentry.Options) -> Swift.Void", + "children": [ + { + "kind": "TypeNameAlias", + "name": "Void", + "printedName": "Swift.Void", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ] + }, + { + "kind": "TypeNominal", + "name": "Options", + "printedName": "Sentry.Options", + "usr": "c:objc(cs)SentryOptions" + } + ] + } + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)startWithConfigureOptions:", + "mangledName": "$s6Sentry0A3SDKC5start16configureOptionsyySo0aE0Cc_tFZ", + "moduleName": "Sentry", + "static": true, + "objc_name": "startWithConfigureOptions:", + "declAttributes": [ + "Final", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "capture", + "printedName": "capture(event:)", + "children": [ + { + "kind": "TypeNominal", + "name": "SentryId", + "printedName": "Sentry.SentryId", + "usr": "c:objc(cs)SentryId" + }, + { + "kind": "TypeNominal", + "name": "Event", + "printedName": "Sentry.Event", + "usr": "c:objc(cs)SentryEvent" + } + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)captureEvent:", + "mangledName": "$s6Sentry0A3SDKC7capture5eventSo0A2IdCSo0A5EventC_tFZ", + "moduleName": "Sentry", + "static": true, + "objc_name": "captureEvent:", + "declAttributes": [ + "Final", + "ObjC", + "DiscardableResult" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "capture", + "printedName": "capture(event:scope:)", + "children": [ + { + "kind": "TypeNominal", + "name": "SentryId", + "printedName": "Sentry.SentryId", + "usr": "c:objc(cs)SentryId" + }, + { + "kind": "TypeNominal", + "name": "Event", + "printedName": "Sentry.Event", + "usr": "c:objc(cs)SentryEvent" + }, + { + "kind": "TypeNominal", + "name": "Scope", + "printedName": "Sentry.Scope", + "usr": "c:objc(cs)SentryScope" + } + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)captureEvent:withScope:", + "mangledName": "$s6Sentry0A3SDKC7capture5event5scopeSo0A2IdCSo0A5EventC_So0A5ScopeCtFZ", + "moduleName": "Sentry", + "static": true, + "objc_name": "captureEvent:withScope:", + "declAttributes": [ + "Final", + "ObjC", + "DiscardableResult" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "capture", + "printedName": "capture(event:block:)", + "children": [ + { + "kind": "TypeNominal", + "name": "SentryId", + "printedName": "Sentry.SentryId", + "usr": "c:objc(cs)SentryId" + }, + { + "kind": "TypeNominal", + "name": "Event", + "printedName": "Sentry.Event", + "usr": "c:objc(cs)SentryEvent" + }, + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(Sentry.Scope) -> Swift.Void", + "children": [ + { + "kind": "TypeNameAlias", + "name": "Void", + "printedName": "Swift.Void", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ] + }, + { + "kind": "TypeNominal", + "name": "Scope", + "printedName": "Sentry.Scope", + "usr": "c:objc(cs)SentryScope" + } + ] + } + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)captureEvent:withScopeBlock:", + "mangledName": "$s6Sentry0A3SDKC7capture5event5blockSo0A2IdCSo0A5EventC_ySo0A5ScopeCctFZ", + "moduleName": "Sentry", + "static": true, + "objc_name": "captureEvent:withScopeBlock:", + "declAttributes": [ + "Final", + "ObjC", + "DiscardableResult" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "startTransaction", + "printedName": "startTransaction(name:operation:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Span", + "printedName": "any Sentry.Span", + "usr": "c:objc(pl)SentrySpan" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)startTransactionWithName:operation:", + "mangledName": "$s6Sentry0A3SDKC16startTransaction4name9operationSo0A4Span_pSS_SStFZ", + "moduleName": "Sentry", + "static": true, + "objc_name": "startTransactionWithName:operation:", + "declAttributes": [ + "Final", + "ObjC", + "DiscardableResult" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "startTransaction", + "printedName": "startTransaction(name:operation:bindToScope:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Span", + "printedName": "any Sentry.Span", + "usr": "c:objc(pl)SentrySpan" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)startTransactionWithName:operation:bindToScope:", + "mangledName": "$s6Sentry0A3SDKC16startTransaction4name9operation11bindToScopeSo0A4Span_pSS_SSSbtFZ", + "moduleName": "Sentry", + "static": true, + "objc_name": "startTransactionWithName:operation:bindToScope:", + "declAttributes": [ + "Final", + "ObjC", + "DiscardableResult" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "startTransaction", + "printedName": "startTransaction(transactionContext:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Span", + "printedName": "any Sentry.Span", + "usr": "c:objc(pl)SentrySpan" + }, + { + "kind": "TypeNominal", + "name": "TransactionContext", + "printedName": "Sentry.TransactionContext", + "usr": "c:objc(cs)SentryTransactionContext" + } + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)startTransactionWithContext:", + "mangledName": "$s6Sentry0A3SDKC16startTransaction18transactionContextSo0A4Span_pSo0adF0C_tFZ", + "moduleName": "Sentry", + "static": true, + "objc_name": "startTransactionWithContext:", + "declAttributes": [ + "Final", + "ObjC", + "DiscardableResult" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "startTransaction", + "printedName": "startTransaction(transactionContext:bindToScope:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Span", + "printedName": "any Sentry.Span", + "usr": "c:objc(pl)SentrySpan" + }, + { + "kind": "TypeNominal", + "name": "TransactionContext", + "printedName": "Sentry.TransactionContext", + "usr": "c:objc(cs)SentryTransactionContext" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)startTransactionWithContext:bindToScope:", + "mangledName": "$s6Sentry0A3SDKC16startTransaction18transactionContext11bindToScopeSo0A4Span_pSo0adF0C_SbtFZ", + "moduleName": "Sentry", + "static": true, + "objc_name": "startTransactionWithContext:bindToScope:", + "declAttributes": [ + "Final", + "ObjC", + "DiscardableResult" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "startTransaction", + "printedName": "startTransaction(transactionContext:bindToScope:customSamplingContext:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Span", + "printedName": "any Sentry.Span", + "usr": "c:objc(pl)SentrySpan" + }, + { + "kind": "TypeNominal", + "name": "TransactionContext", + "printedName": "Sentry.TransactionContext", + "usr": "c:objc(cs)SentryTransactionContext" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Any]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)startTransactionWithContext:bindToScope:customSamplingContext:", + "mangledName": "$s6Sentry0A3SDKC16startTransaction18transactionContext11bindToScope014customSamplingF0So0A4Span_pSo0adF0C_SbSDySSypGtFZ", + "moduleName": "Sentry", + "static": true, + "objc_name": "startTransactionWithContext:bindToScope:customSamplingContext:", + "declAttributes": [ + "Final", + "ObjC", + "DiscardableResult" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "startTransaction", + "printedName": "startTransaction(transactionContext:customSamplingContext:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Span", + "printedName": "any Sentry.Span", + "usr": "c:objc(pl)SentrySpan" + }, + { + "kind": "TypeNominal", + "name": "TransactionContext", + "printedName": "Sentry.TransactionContext", + "usr": "c:objc(cs)SentryTransactionContext" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Any]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)startTransactionWithContext:customSamplingContext:", + "mangledName": "$s6Sentry0A3SDKC16startTransaction18transactionContext014customSamplingF0So0A4Span_pSo0adF0C_SDySSypGtFZ", + "moduleName": "Sentry", + "static": true, + "objc_name": "startTransactionWithContext:customSamplingContext:", + "declAttributes": [ + "Final", + "ObjC", + "DiscardableResult" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "capture", + "printedName": "capture(error:)", + "children": [ + { + "kind": "TypeNominal", + "name": "SentryId", + "printedName": "Sentry.SentryId", + "usr": "c:objc(cs)SentryId" + }, + { + "kind": "TypeNominal", + "name": "Error", + "printedName": "any Swift.Error", + "usr": "s:s5ErrorP" + } + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)captureError:", + "mangledName": "$s6Sentry0A3SDKC7capture5errorSo0A2IdCs5Error_p_tFZ", + "moduleName": "Sentry", + "static": true, + "objc_name": "captureError:", + "declAttributes": [ + "Final", + "ObjC", + "DiscardableResult" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "capture", + "printedName": "capture(error:scope:)", + "children": [ + { + "kind": "TypeNominal", + "name": "SentryId", + "printedName": "Sentry.SentryId", + "usr": "c:objc(cs)SentryId" + }, + { + "kind": "TypeNominal", + "name": "Error", + "printedName": "any Swift.Error", + "usr": "s:s5ErrorP" + }, + { + "kind": "TypeNominal", + "name": "Scope", + "printedName": "Sentry.Scope", + "usr": "c:objc(cs)SentryScope" + } + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)captureError:withScope:", + "mangledName": "$s6Sentry0A3SDKC7capture5error5scopeSo0A2IdCs5Error_p_So0A5ScopeCtFZ", + "moduleName": "Sentry", + "static": true, + "objc_name": "captureError:withScope:", + "declAttributes": [ + "Final", + "ObjC", + "DiscardableResult" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "capture", + "printedName": "capture(error:block:)", + "children": [ + { + "kind": "TypeNominal", + "name": "SentryId", + "printedName": "Sentry.SentryId", + "usr": "c:objc(cs)SentryId" + }, + { + "kind": "TypeNominal", + "name": "Error", + "printedName": "any Swift.Error", + "usr": "s:s5ErrorP" + }, + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(Sentry.Scope) -> Swift.Void", + "children": [ + { + "kind": "TypeNameAlias", + "name": "Void", + "printedName": "Swift.Void", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ] + }, + { + "kind": "TypeNominal", + "name": "Scope", + "printedName": "Sentry.Scope", + "usr": "c:objc(cs)SentryScope" + } + ] + } + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)captureError:withScopeBlock:", + "mangledName": "$s6Sentry0A3SDKC7capture5error5blockSo0A2IdCs5Error_p_ySo0A5ScopeCctFZ", + "moduleName": "Sentry", + "static": true, + "objc_name": "captureError:withScopeBlock:", + "declAttributes": [ + "Final", + "ObjC", + "DiscardableResult" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "capture", + "printedName": "capture(exception:)", + "children": [ + { + "kind": "TypeNominal", + "name": "SentryId", + "printedName": "Sentry.SentryId", + "usr": "c:objc(cs)SentryId" + }, + { + "kind": "TypeNominal", + "name": "NSException", + "printedName": "Foundation.NSException", + "usr": "c:objc(cs)NSException" + } + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)captureException:", + "mangledName": "$s6Sentry0A3SDKC7capture9exceptionSo0A2IdCSo11NSExceptionC_tFZ", + "moduleName": "Sentry", + "static": true, + "objc_name": "captureException:", + "declAttributes": [ + "Final", + "ObjC", + "DiscardableResult" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "capture", + "printedName": "capture(exception:scope:)", + "children": [ + { + "kind": "TypeNominal", + "name": "SentryId", + "printedName": "Sentry.SentryId", + "usr": "c:objc(cs)SentryId" + }, + { + "kind": "TypeNominal", + "name": "NSException", + "printedName": "Foundation.NSException", + "usr": "c:objc(cs)NSException" + }, + { + "kind": "TypeNominal", + "name": "Scope", + "printedName": "Sentry.Scope", + "usr": "c:objc(cs)SentryScope" + } + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)captureException:withScope:", + "mangledName": "$s6Sentry0A3SDKC7capture9exception5scopeSo0A2IdCSo11NSExceptionC_So0A5ScopeCtFZ", + "moduleName": "Sentry", + "static": true, + "objc_name": "captureException:withScope:", + "declAttributes": [ + "Final", + "ObjC", + "DiscardableResult" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "capture", + "printedName": "capture(exception:block:)", + "children": [ + { + "kind": "TypeNominal", + "name": "SentryId", + "printedName": "Sentry.SentryId", + "usr": "c:objc(cs)SentryId" + }, + { + "kind": "TypeNominal", + "name": "NSException", + "printedName": "Foundation.NSException", + "usr": "c:objc(cs)NSException" + }, + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(Sentry.Scope) -> Swift.Void", + "children": [ + { + "kind": "TypeNameAlias", + "name": "Void", + "printedName": "Swift.Void", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ] + }, + { + "kind": "TypeNominal", + "name": "Scope", + "printedName": "Sentry.Scope", + "usr": "c:objc(cs)SentryScope" + } + ] + } + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)captureException:withScopeBlock:", + "mangledName": "$s6Sentry0A3SDKC7capture9exception5blockSo0A2IdCSo11NSExceptionC_ySo0A5ScopeCctFZ", + "moduleName": "Sentry", + "static": true, + "objc_name": "captureException:withScopeBlock:", + "declAttributes": [ + "Final", + "ObjC", + "DiscardableResult" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "capture", + "printedName": "capture(message:)", + "children": [ + { + "kind": "TypeNominal", + "name": "SentryId", + "printedName": "Sentry.SentryId", + "usr": "c:objc(cs)SentryId" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)captureMessage:", + "mangledName": "$s6Sentry0A3SDKC7capture7messageSo0A2IdCSS_tFZ", + "moduleName": "Sentry", + "static": true, + "objc_name": "captureMessage:", + "declAttributes": [ + "Final", + "ObjC", + "DiscardableResult" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "capture", + "printedName": "capture(message:scope:)", + "children": [ + { + "kind": "TypeNominal", + "name": "SentryId", + "printedName": "Sentry.SentryId", + "usr": "c:objc(cs)SentryId" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "Scope", + "printedName": "Sentry.Scope", + "usr": "c:objc(cs)SentryScope" + } + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)captureMessage:withScope:", + "mangledName": "$s6Sentry0A3SDKC7capture7message5scopeSo0A2IdCSS_So0A5ScopeCtFZ", + "moduleName": "Sentry", + "static": true, + "objc_name": "captureMessage:withScope:", + "declAttributes": [ + "Final", + "ObjC", + "DiscardableResult" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "capture", + "printedName": "capture(message:block:)", + "children": [ + { + "kind": "TypeNominal", + "name": "SentryId", + "printedName": "Sentry.SentryId", + "usr": "c:objc(cs)SentryId" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(Sentry.Scope) -> Swift.Void", + "children": [ + { + "kind": "TypeNameAlias", + "name": "Void", + "printedName": "Swift.Void", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ] + }, + { + "kind": "TypeNominal", + "name": "Scope", + "printedName": "Sentry.Scope", + "usr": "c:objc(cs)SentryScope" + } + ] + } + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)captureMessage:withScopeBlock:", + "mangledName": "$s6Sentry0A3SDKC7capture7message5blockSo0A2IdCSS_ySo0A5ScopeCctFZ", + "moduleName": "Sentry", + "static": true, + "objc_name": "captureMessage:withScopeBlock:", + "declAttributes": [ + "Final", + "ObjC", + "DiscardableResult" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "capture", + "printedName": "capture(feedback:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "SentryFeedback", + "printedName": "Sentry.SentryFeedback", + "usr": "c:@M@Sentry@objc(cs)SentryFeedback" + } + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)captureFeedback:", + "mangledName": "$s6Sentry0A3SDKC7capture8feedbackyAA0A8FeedbackC_tFZ", + "moduleName": "Sentry", + "static": true, + "objc_name": "captureFeedback:", + "declAttributes": [ + "Final", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Var", + "name": "feedback", + "printedName": "feedback", + "children": [ + { + "kind": "TypeNominal", + "name": "SentryFeedbackAPI", + "printedName": "Sentry.SentryFeedbackAPI", + "usr": "c:objc(cs)SentryFeedbackAPI" + } + ], + "declKind": "Var", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cpy)feedback", + "mangledName": "$s6Sentry0A3SDKC8feedbackSo0A11FeedbackAPICvpZ", + "moduleName": "Sentry", + "static": true, + "declAttributes": [ + "Final", + "ObjC", + "HasStorage" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "SentryFeedbackAPI", + "printedName": "Sentry.SentryFeedbackAPI", + "usr": "c:objc(cs)SentryFeedbackAPI" + } + ], + "declKind": "Accessor", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)feedback", + "mangledName": "$s6Sentry0A3SDKC8feedbackSo0A11FeedbackAPICvgZ", + "moduleName": "Sentry", + "static": true, + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "addBreadcrumb", + "printedName": "addBreadcrumb(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Breadcrumb", + "printedName": "Sentry.Breadcrumb", + "usr": "c:objc(cs)SentryBreadcrumb" + } + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)addBreadcrumb:", + "mangledName": "$s6Sentry0A3SDKC13addBreadcrumbyySo0aD0CFZ", + "moduleName": "Sentry", + "static": true, + "objc_name": "addBreadcrumb:", + "declAttributes": [ + "Final", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "configureScope", + "printedName": "configureScope(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(Sentry.Scope) -> Swift.Void", + "children": [ + { + "kind": "TypeNameAlias", + "name": "Void", + "printedName": "Swift.Void", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ] + }, + { + "kind": "TypeNominal", + "name": "Scope", + "printedName": "Sentry.Scope", + "usr": "c:objc(cs)SentryScope" + } + ] + } + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)configureScope:", + "mangledName": "$s6Sentry0A3SDKC14configureScopeyyySo0aD0CcFZ", + "moduleName": "Sentry", + "static": true, + "objc_name": "configureScope:", + "declAttributes": [ + "Final", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Var", + "name": "crashedLastRun", + "printedName": "crashedLastRun", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cpy)crashedLastRun", + "mangledName": "$s6Sentry0A3SDKC14crashedLastRunSbvpZ", + "moduleName": "Sentry", + "static": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)crashedLastRun", + "mangledName": "$s6Sentry0A3SDKC14crashedLastRunSbvgZ", + "moduleName": "Sentry", + "static": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "detectedStartUpCrash", + "printedName": "detectedStartUpCrash", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cpy)detectedStartUpCrash", + "mangledName": "$s6Sentry0A3SDKC20detectedStartUpCrashSbvpZ", + "moduleName": "Sentry", + "static": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Accessor", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)detectedStartUpCrash", + "mangledName": "$s6Sentry0A3SDKC20detectedStartUpCrashSbvgZ", + "moduleName": "Sentry", + "static": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Function", + "name": "setUser", + "printedName": "setUser(_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Sentry.User?", + "children": [ + { + "kind": "TypeNominal", + "name": "User", + "printedName": "Sentry.User", + "usr": "c:objc(cs)SentryUser" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)setUser:", + "mangledName": "$s6Sentry0A3SDKC7setUseryySo0aD0CSgFZ", + "moduleName": "Sentry", + "static": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "startSession", + "printedName": "startSession()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)startSession", + "mangledName": "$s6Sentry0A3SDKC12startSessionyyFZ", + "moduleName": "Sentry", + "static": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "endSession", + "printedName": "endSession()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)endSession", + "mangledName": "$s6Sentry0A3SDKC10endSessionyyFZ", + "moduleName": "Sentry", + "static": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "crash", + "printedName": "crash()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)crash", + "mangledName": "$s6Sentry0A3SDKC5crashyyFZ", + "moduleName": "Sentry", + "static": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "reportFullyDisplayed", + "printedName": "reportFullyDisplayed()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)reportFullyDisplayed", + "mangledName": "$s6Sentry0A3SDKC20reportFullyDisplayedyyFZ", + "moduleName": "Sentry", + "static": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "pauseAppHangTracking", + "printedName": "pauseAppHangTracking()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)pauseAppHangTracking", + "mangledName": "$s6Sentry0A3SDKC20pauseAppHangTrackingyyFZ", + "moduleName": "Sentry", + "static": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "resumeAppHangTracking", + "printedName": "resumeAppHangTracking()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)resumeAppHangTracking", + "mangledName": "$s6Sentry0A3SDKC21resumeAppHangTrackingyyFZ", + "moduleName": "Sentry", + "static": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "flush", + "printedName": "flush(timeout:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNameAlias", + "name": "TimeInterval", + "printedName": "Foundation.TimeInterval", + "children": [ + { + "kind": "TypeNominal", + "name": "Double", + "printedName": "Swift.Double", + "usr": "s:Sd" + } + ] + } + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)flush:", + "mangledName": "$s6Sentry0A3SDKC5flush7timeoutySd_tFZ", + "moduleName": "Sentry", + "static": true, + "objc_name": "flush:", + "declAttributes": [ + "Final", + "ObjC" + ], + "funcSelfKind": "NonMutating" }, { - "kind": "Var", - "name": "profileAppStarts", - "printedName": "profileAppStarts", + "kind": "Function", + "name": "close", + "printedName": "close()", "children": [ { "kind": "TypeNominal", - "name": "Bool", - "printedName": "Swift.Bool", - "usr": "s:Sb" + "name": "Void", + "printedName": "()" } ], - "declKind": "Var", - "usr": "c:@M@Sentry@objc(cs)SentryProfileOptions(py)profileAppStarts", - "mangledName": "$s6Sentry0A14ProfileOptionsC16profileAppStartsSbvp", + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)close", + "mangledName": "$s6Sentry0A3SDKC5closeyyFZ", "moduleName": "Sentry", + "static": true, "declAttributes": [ "Final", - "ObjC", - "HasStorage" + "ObjC" ], - "hasStorage": true, - "accessors": [ + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "startProfiler", + "printedName": "startProfiler()", + "children": [ { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ - { - "kind": "TypeNominal", - "name": "Bool", - "printedName": "Swift.Bool", - "usr": "s:Sb" - } - ], - "declKind": "Accessor", - "usr": "c:@M@Sentry@objc(cs)SentryProfileOptions(im)profileAppStarts", - "mangledName": "$s6Sentry0A14ProfileOptionsC16profileAppStartsSbvg", - "moduleName": "Sentry", - "implicit": true, - "declAttributes": [ - "Final", - "ObjC" - ], - "accessorKind": "get" - }, + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)startProfiler", + "mangledName": "$s6Sentry0A3SDKC13startProfileryyFZ", + "moduleName": "Sentry", + "static": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "stopProfiler", + "printedName": "stopProfiler()", + "children": [ { - "kind": "Accessor", - "name": "Set", - "printedName": "Set()", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - }, - { - "kind": "TypeNominal", - "name": "Bool", - "printedName": "Swift.Bool", - "usr": "s:Sb" - } - ], - "declKind": "Accessor", - "usr": "c:@M@Sentry@objc(cs)SentryProfileOptions(im)setProfileAppStarts:", - "mangledName": "$s6Sentry0A14ProfileOptionsC16profileAppStartsSbvs", - "moduleName": "Sentry", - "implicit": true, - "declAttributes": [ - "Final", - "ObjC" - ], - "accessorKind": "set" + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" } - ] + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)stopProfiler", + "mangledName": "$s6Sentry0A3SDKC12stopProfileryyFZ", + "moduleName": "Sentry", + "static": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "funcSelfKind": "NonMutating" }, { "kind": "Constructor", @@ -49427,14 +49535,14 @@ "children": [ { "kind": "TypeNominal", - "name": "SentryProfileOptions", - "printedName": "Sentry.SentryProfileOptions", - "usr": "c:@M@Sentry@objc(cs)SentryProfileOptions" + "name": "SentrySDK", + "printedName": "Sentry.SentrySDK", + "usr": "c:@M@Sentry@objc(cs)SentrySDK" } ], "declKind": "Constructor", - "usr": "c:@M@Sentry@objc(cs)SentryProfileOptions(im)init", - "mangledName": "$s6Sentry0A14ProfileOptionsCACycfc", + "usr": "c:@M@Sentry@objc(cs)SentrySDK(im)init", + "mangledName": "$s6Sentry0A3SDKCACycfc", "moduleName": "Sentry", "overriding": true, "objc_name": "init", @@ -49447,12 +49555,11 @@ } ], "declKind": "Class", - "usr": "c:@M@Sentry@objc(cs)SentryProfileOptions", - "mangledName": "$s6Sentry0A14ProfileOptionsC", + "usr": "c:@M@Sentry@objc(cs)SentrySDK", + "mangledName": "$s6Sentry0A3SDKC", "moduleName": "Sentry", + "isOpen": true, "declAttributes": [ - "Final", - "ObjCMembers", "ObjC" ], "superclassUsr": "c:objc(cs)NSObject", @@ -49520,330 +49627,69 @@ }, { "kind": "TypeDecl", - "name": "SentryId", - "printedName": "SentryId", + "name": "SentryRedactViewHelper", + "printedName": "SentryRedactViewHelper", "children": [ { - "kind": "Var", - "name": "empty", - "printedName": "empty", - "children": [ - { - "kind": "TypeNominal", - "name": "SentryId", - "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" - } - ], - "declKind": "Var", - "usr": "c:@M@Sentry@objc(cs)SentryId(cpy)empty", - "mangledName": "$s6Sentry0A2IdC5emptyACvpZ", - "moduleName": "Sentry", - "static": true, - "declAttributes": [ - "Final", - "ObjC", - "HasStorage" - ], - "isLet": true, - "hasStorage": true, - "accessors": [ - { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ - { - "kind": "TypeNominal", - "name": "SentryId", - "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" - } - ], - "declKind": "Accessor", - "usr": "c:@M@Sentry@objc(cs)SentryId(cm)empty", - "mangledName": "$s6Sentry0A2IdC5emptyACvgZ", - "moduleName": "Sentry", - "static": true, - "implicit": true, - "declAttributes": [ - "Final", - "ObjC" - ], - "accessorKind": "get" - } - ] - }, - { - "kind": "Var", - "name": "sentryIdString", - "printedName": "sentryIdString", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "declKind": "Var", - "usr": "c:@M@Sentry@objc(cs)SentryId(py)sentryIdString", - "mangledName": "$s6Sentry0A2IdC06sentryB6StringSSvp", - "moduleName": "Sentry", - "declAttributes": [ - "Final", - "ObjC" - ], - "accessors": [ - { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "declKind": "Accessor", - "usr": "c:@M@Sentry@objc(cs)SentryId(im)sentryIdString", - "mangledName": "$s6Sentry0A2IdC06sentryB6StringSSvg", - "moduleName": "Sentry", - "declAttributes": [ - "Final", - "ObjC" - ], - "accessorKind": "get" - } - ] - }, - { - "kind": "Constructor", - "name": "init", - "printedName": "init()", - "children": [ - { - "kind": "TypeNominal", - "name": "SentryId", - "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" - } - ], - "declKind": "Constructor", - "usr": "c:@M@Sentry@objc(cs)SentryId(im)init", - "mangledName": "$s6Sentry0A2IdCACycfc", - "moduleName": "Sentry", - "overriding": true, - "objc_name": "init", - "declAttributes": [ - "ObjC", - "Dynamic", - "Override" - ], - "init_kind": "Designated" - }, - { - "kind": "Constructor", - "name": "init", - "printedName": "init(uuid:)", - "children": [ - { - "kind": "TypeNominal", - "name": "SentryId", - "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" - }, - { - "kind": "TypeNominal", - "name": "UUID", - "printedName": "Foundation.UUID", - "usr": "s:10Foundation4UUIDV" - } - ], - "declKind": "Constructor", - "usr": "c:@M@Sentry@objc(cs)SentryId(im)initWithUuid:", - "mangledName": "$s6Sentry0A2IdC4uuidAC10Foundation4UUIDV_tcfc", - "moduleName": "Sentry", - "objc_name": "initWithUuid:", - "declAttributes": [ - "ObjC" - ], - "init_kind": "Designated" - }, - { - "kind": "Constructor", - "name": "init", - "printedName": "init(uuidString:)", + "kind": "Function", + "name": "clipOutView", + "printedName": "clipOutView(_:)", "children": [ { "kind": "TypeNominal", - "name": "SentryId", - "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" + "name": "Void", + "printedName": "()" }, { "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" + "name": "UIView", + "printedName": "UIKit.UIView", + "usr": "c:objc(cs)UIView" } ], - "declKind": "Constructor", - "usr": "c:@M@Sentry@objc(cs)SentryId(im)initWithUUIDString:", - "mangledName": "$s6Sentry0A2IdC10uuidStringACSS_tcfc", + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentryRedactViewHelper(cm)clipOutView:", + "mangledName": "$s6Sentry0A16RedactViewHelperC07clipOutC0yySo6UIViewCFZ", "moduleName": "Sentry", - "objc_name": "initWithUUIDString:", + "static": true, "declAttributes": [ + "Final", "ObjC" ], - "init_kind": "Designated" + "funcSelfKind": "NonMutating" }, { "kind": "Function", - "name": "isEqual", - "printedName": "isEqual(_:)", + "name": "maskSwiftUI", + "printedName": "maskSwiftUI(_:)", "children": [ { "kind": "TypeNominal", - "name": "Bool", - "printedName": "Swift.Bool", - "usr": "s:Sb" + "name": "Void", + "printedName": "()" }, { "kind": "TypeNominal", - "name": "Optional", - "printedName": "Any?", - "children": [ - { - "kind": "TypeNominal", - "name": "ProtocolComposition", - "printedName": "Any" - } - ], - "usr": "s:Sq" + "name": "UIView", + "printedName": "UIKit.UIView", + "usr": "c:objc(cs)UIView" } ], "declKind": "Func", - "usr": "c:@M@Sentry@objc(cs)SentryId(im)isEqual:", - "mangledName": "$s6Sentry0A2IdC7isEqualySbypSgF", + "usr": "c:@M@Sentry@objc(cs)SentryRedactViewHelper(cm)maskSwiftUI:", + "mangledName": "$s6Sentry0A16RedactViewHelperC11maskSwiftUIyySo6UIViewCFZ", "moduleName": "Sentry", - "overriding": true, - "objc_name": "isEqual:", + "static": true, "declAttributes": [ - "ObjC", "Final", - "Override" + "ObjC" ], "funcSelfKind": "NonMutating" - }, - { - "kind": "Var", - "name": "description", - "printedName": "description", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "declKind": "Var", - "usr": "c:@M@Sentry@objc(cs)SentryId(py)description", - "mangledName": "$s6Sentry0A2IdC11descriptionSSvp", - "moduleName": "Sentry", - "overriding": true, - "objc_name": "description", - "declAttributes": [ - "ObjC", - "Final", - "Override" - ], - "accessors": [ - { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "declKind": "Accessor", - "usr": "c:@M@Sentry@objc(cs)SentryId(im)description", - "mangledName": "$s6Sentry0A2IdC11descriptionSSvg", - "moduleName": "Sentry", - "overriding": true, - "objc_name": "description", - "declAttributes": [ - "Final", - "ObjC", - "Override" - ], - "accessorKind": "get" - } - ] - }, - { - "kind": "Var", - "name": "hash", - "printedName": "hash", - "children": [ - { - "kind": "TypeNominal", - "name": "Int", - "printedName": "Swift.Int", - "usr": "s:Si" - } - ], - "declKind": "Var", - "usr": "c:@M@Sentry@objc(cs)SentryId(py)hash", - "mangledName": "$s6Sentry0A2IdC4hashSivp", - "moduleName": "Sentry", - "overriding": true, - "objc_name": "hash", - "declAttributes": [ - "ObjC", - "Final", - "Override" - ], - "accessors": [ - { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ - { - "kind": "TypeNominal", - "name": "Int", - "printedName": "Swift.Int", - "usr": "s:Si" - } - ], - "declKind": "Accessor", - "usr": "c:@M@Sentry@objc(cs)SentryId(im)hash", - "mangledName": "$s6Sentry0A2IdC4hashSivg", - "moduleName": "Sentry", - "overriding": true, - "objc_name": "hash", - "declAttributes": [ - "Final", - "ObjC", - "Override" - ], - "accessorKind": "get" - } - ] } ], "declKind": "Class", - "usr": "c:@M@Sentry@objc(cs)SentryId", - "mangledName": "$s6Sentry0A2IdC", + "usr": "c:@M@Sentry@objc(cs)SentryRedactViewHelper", + "mangledName": "$s6Sentry0A16RedactViewHelperC", "moduleName": "Sentry", "declAttributes": [ "Final", @@ -49851,18 +49697,12 @@ "ObjC" ], "superclassUsr": "c:objc(cs)NSObject", + "hasMissingDesignatedInitializers": true, "inheritsConvenienceInitializers": true, "superclassNames": [ "ObjectiveC.NSObject" ], "conformances": [ - { - "kind": "Conformance", - "name": "Sendable", - "printedName": "Sendable", - "usr": "s:s8SendableP", - "mangledName": "$ss8SendableP" - }, { "kind": "Conformance", "name": "Copyable", @@ -49922,236 +49762,74 @@ }, { "kind": "TypeDecl", - "name": "SentrySDK", - "printedName": "SentrySDK", - "children": [ - { - "kind": "Var", - "name": "span", - "printedName": "span", - "children": [ - { - "kind": "TypeNominal", - "name": "Optional", - "printedName": "(any Sentry.Span)?", - "children": [ - { - "kind": "TypeNominal", - "name": "Span", - "printedName": "any Sentry.Span", - "usr": "c:objc(pl)SentrySpan" - } - ], - "usr": "s:Sq" - } - ], - "declKind": "Var", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cpy)span", - "mangledName": "$s6Sentry0A3SDKC4spanSo0A4Span_pSgvpZ", - "moduleName": "Sentry", - "static": true, - "declAttributes": [ - "Final", - "ObjC" - ], - "accessors": [ - { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ - { - "kind": "TypeNominal", - "name": "Optional", - "printedName": "(any Sentry.Span)?", - "children": [ - { - "kind": "TypeNominal", - "name": "Span", - "printedName": "any Sentry.Span", - "usr": "c:objc(pl)SentrySpan" - } - ], - "usr": "s:Sq" - } - ], - "declKind": "Accessor", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)span", - "mangledName": "$s6Sentry0A3SDKC4spanSo0A4Span_pSgvgZ", - "moduleName": "Sentry", - "static": true, - "declAttributes": [ - "Final", - "ObjC" - ], - "accessorKind": "get" - } - ] - }, + "name": "SentryHub", + "printedName": "SentryHub", + "children": [ { - "kind": "Var", - "name": "isEnabled", - "printedName": "isEnabled", + "kind": "Constructor", + "name": "init", + "printedName": "init(client:andScope:)", "children": [ { "kind": "TypeNominal", - "name": "Bool", - "printedName": "Swift.Bool", - "usr": "s:Sb" - } - ], - "declKind": "Var", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cpy)isEnabled", - "mangledName": "$s6Sentry0A3SDKC9isEnabledSbvpZ", - "moduleName": "Sentry", - "static": true, - "declAttributes": [ - "Final", - "ObjC" - ], - "accessors": [ + "name": "SentryHub", + "printedName": "Sentry.SentryHub", + "usr": "c:@M@Sentry@objc(cs)SentryHub" + }, { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Sentry.SentryClient?", "children": [ { "kind": "TypeNominal", - "name": "Bool", - "printedName": "Swift.Bool", - "usr": "s:Sb" + "name": "SentryClient", + "printedName": "Sentry.SentryClient", + "usr": "c:@M@Sentry@objc(cs)SentryClient" } ], - "declKind": "Accessor", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)isEnabled", - "mangledName": "$s6Sentry0A3SDKC9isEnabledSbvgZ", - "moduleName": "Sentry", - "static": true, - "declAttributes": [ - "Final", - "ObjC" - ], - "accessorKind": "get" - } - ] - }, - { - "kind": "Var", - "name": "replay", - "printedName": "replay", - "children": [ + "usr": "s:Sq" + }, { "kind": "TypeNominal", - "name": "SentryReplayApi", - "printedName": "Sentry.SentryReplayApi", - "usr": "c:objc(cs)SentryReplayApi" - } - ], - "declKind": "Var", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cpy)replay", - "mangledName": "$s6Sentry0A3SDKC6replaySo0A9ReplayApiCvpZ", - "moduleName": "Sentry", - "static": true, - "declAttributes": [ - "Final", - "ObjC" - ], - "accessors": [ - { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", + "name": "Optional", + "printedName": "Sentry.Scope?", "children": [ { "kind": "TypeNominal", - "name": "SentryReplayApi", - "printedName": "Sentry.SentryReplayApi", - "usr": "c:objc(cs)SentryReplayApi" + "name": "Scope", + "printedName": "Sentry.Scope", + "usr": "c:objc(cs)SentryScope" } ], - "declKind": "Accessor", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)replay", - "mangledName": "$s6Sentry0A3SDKC6replaySo0A9ReplayApiCvgZ", - "moduleName": "Sentry", - "static": true, - "declAttributes": [ - "Final", - "ObjC" - ], - "accessorKind": "get" - } - ] - }, - { - "kind": "Var", - "name": "logger", - "printedName": "logger", - "children": [ - { - "kind": "TypeNominal", - "name": "SentryLogger", - "printedName": "Sentry.SentryLogger", - "usr": "c:@M@Sentry@objc(cs)SentryLogger" + "usr": "s:Sq" } ], - "declKind": "Var", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cpy)logger", - "mangledName": "$s6Sentry0A3SDKC6loggerAA0A6LoggerCvpZ", + "declKind": "Constructor", + "usr": "c:@M@Sentry@objc(cs)SentryHub(im)initWithClient:andScope:", + "mangledName": "$s6Sentry0A3HubC6client8andScopeAcA0A6ClientCSg_So0aE0CSgtcfc", "moduleName": "Sentry", - "static": true, + "objc_name": "initWithClient:andScope:", "declAttributes": [ - "Final", "ObjC" ], - "accessors": [ - { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ - { - "kind": "TypeNominal", - "name": "SentryLogger", - "printedName": "Sentry.SentryLogger", - "usr": "c:@M@Sentry@objc(cs)SentryLogger" - } - ], - "declKind": "Accessor", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)logger", - "mangledName": "$s6Sentry0A3SDKC6loggerAA0A6LoggerCvgZ", - "moduleName": "Sentry", - "static": true, - "declAttributes": [ - "Final", - "ObjC" - ], - "accessorKind": "get" - } - ] + "init_kind": "Designated" }, { "kind": "Function", - "name": "start", - "printedName": "start(options:)", + "name": "startSession", + "printedName": "startSession()", "children": [ { "kind": "TypeNominal", "name": "Void", "printedName": "()" - }, - { - "kind": "TypeNominal", - "name": "Options", - "printedName": "Sentry.Options", - "usr": "c:objc(cs)SentryOptions" } ], "declKind": "Func", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)startWithOptions:", - "mangledName": "$s6Sentry0A3SDKC5start7optionsySo0A7OptionsC_tFZ", + "usr": "c:@M@Sentry@objc(cs)SentryHub(im)startSession", + "mangledName": "$s6Sentry0A3HubC12startSessionyyF", "moduleName": "Sentry", - "static": true, - "objc_name": "startWithOptions:", "declAttributes": [ "Final", "ObjC" @@ -50160,46 +49838,19 @@ }, { "kind": "Function", - "name": "start", - "printedName": "start(configureOptions:)", + "name": "endSession", + "printedName": "endSession()", "children": [ { "kind": "TypeNominal", "name": "Void", "printedName": "()" - }, - { - "kind": "TypeFunc", - "name": "Function", - "printedName": "(Sentry.Options) -> Swift.Void", - "children": [ - { - "kind": "TypeNameAlias", - "name": "Void", - "printedName": "Swift.Void", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - } - ] - }, - { - "kind": "TypeNominal", - "name": "Options", - "printedName": "Sentry.Options", - "usr": "c:objc(cs)SentryOptions" - } - ] } ], "declKind": "Func", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)startWithConfigureOptions:", - "mangledName": "$s6Sentry0A3SDKC5start16configureOptionsyySo0aE0Cc_tFZ", + "usr": "c:@M@Sentry@objc(cs)SentryHub(im)endSession", + "mangledName": "$s6Sentry0A3HubC10endSessionyyF", "moduleName": "Sentry", - "static": true, - "objc_name": "startWithConfigureOptions:", "declAttributes": [ "Final", "ObjC" @@ -50208,65 +49859,55 @@ }, { "kind": "Function", - "name": "capture", - "printedName": "capture(event:)", + "name": "endSession", + "printedName": "endSession(withTimestamp:)", "children": [ { "kind": "TypeNominal", - "name": "SentryId", - "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" + "name": "Void", + "printedName": "()" }, { "kind": "TypeNominal", - "name": "Event", - "printedName": "Sentry.Event", - "usr": "c:objc(cs)SentryEvent" + "name": "Date", + "printedName": "Foundation.Date", + "usr": "s:10Foundation4DateV" } ], "declKind": "Func", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)captureEvent:", - "mangledName": "$s6Sentry0A3SDKC7capture5eventAA0A2IdCSo0A5EventC_tFZ", + "usr": "c:@M@Sentry@objc(cs)SentryHub(im)endSessionWithTimestamp:", + "mangledName": "$s6Sentry0A3HubC10endSession13withTimestampy10Foundation4DateV_tF", "moduleName": "Sentry", - "static": true, - "objc_name": "captureEvent:", + "objc_name": "endSessionWithTimestamp:", "declAttributes": [ "Final", - "ObjC", - "DiscardableResult" + "ObjC" ], "funcSelfKind": "NonMutating" }, { "kind": "Function", "name": "capture", - "printedName": "capture(event:scope:)", + "printedName": "capture(event:)", "children": [ { "kind": "TypeNominal", "name": "SentryId", "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" + "usr": "c:objc(cs)SentryId" }, { "kind": "TypeNominal", "name": "Event", "printedName": "Sentry.Event", "usr": "c:objc(cs)SentryEvent" - }, - { - "kind": "TypeNominal", - "name": "Scope", - "printedName": "Sentry.Scope", - "usr": "c:objc(cs)SentryScope" } ], "declKind": "Func", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)captureEvent:withScope:", - "mangledName": "$s6Sentry0A3SDKC7capture5event5scopeAA0A2IdCSo0A5EventC_So0A5ScopeCtFZ", + "usr": "c:@M@Sentry@objc(cs)SentryHub(im)captureEvent:", + "mangledName": "$s6Sentry0A3HubC7capture5eventSo0A2IdCSo0A5EventC_tF", "moduleName": "Sentry", - "static": true, - "objc_name": "captureEvent:withScope:", + "objc_name": "captureEvent:", "declAttributes": [ "Final", "ObjC", @@ -50277,13 +49918,13 @@ { "kind": "Function", "name": "capture", - "printedName": "capture(event:block:)", + "printedName": "capture(event:scope:)", "children": [ { "kind": "TypeNominal", "name": "SentryId", "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" + "usr": "c:objc(cs)SentryId" }, { "kind": "TypeNominal", @@ -50292,37 +49933,17 @@ "usr": "c:objc(cs)SentryEvent" }, { - "kind": "TypeFunc", - "name": "Function", - "printedName": "(Sentry.Scope) -> Swift.Void", - "children": [ - { - "kind": "TypeNameAlias", - "name": "Void", - "printedName": "Swift.Void", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - } - ] - }, - { - "kind": "TypeNominal", - "name": "Scope", - "printedName": "Sentry.Scope", - "usr": "c:objc(cs)SentryScope" - } - ] + "kind": "TypeNominal", + "name": "Scope", + "printedName": "Sentry.Scope", + "usr": "c:objc(cs)SentryScope" } ], "declKind": "Func", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)captureEvent:withScopeBlock:", - "mangledName": "$s6Sentry0A3SDKC7capture5event5blockAA0A2IdCSo0A5EventC_ySo0A5ScopeCctFZ", + "usr": "c:@M@Sentry@objc(cs)SentryHub(im)captureEvent:withScope:", + "mangledName": "$s6Sentry0A3HubC7capture5event5scopeSo0A2IdCSo0A5EventC_So0A5ScopeCtF", "moduleName": "Sentry", - "static": true, - "objc_name": "captureEvent:withScopeBlock:", + "objc_name": "captureEvent:withScope:", "declAttributes": [ "Final", "ObjC", @@ -50355,10 +49976,9 @@ } ], "declKind": "Func", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)startTransactionWithName:operation:", - "mangledName": "$s6Sentry0A3SDKC16startTransaction4name9operationSo0A4Span_pSS_SStFZ", + "usr": "c:@M@Sentry@objc(cs)SentryHub(im)startTransactionWithName:operation:", + "mangledName": "$s6Sentry0A3HubC16startTransaction4name9operationSo0A4Span_pSS_SStF", "moduleName": "Sentry", - "static": true, "objc_name": "startTransactionWithName:operation:", "declAttributes": [ "Final", @@ -50398,10 +50018,9 @@ } ], "declKind": "Func", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)startTransactionWithName:operation:bindToScope:", - "mangledName": "$s6Sentry0A3SDKC16startTransaction4name9operation11bindToScopeSo0A4Span_pSS_SSSbtFZ", + "usr": "c:@M@Sentry@objc(cs)SentryHub(im)startTransactionWithName:operation:bindToScope:", + "mangledName": "$s6Sentry0A3HubC16startTransaction4name9operation11bindToScopeSo0A4Span_pSS_SSSbtF", "moduleName": "Sentry", - "static": true, "objc_name": "startTransactionWithName:operation:bindToScope:", "declAttributes": [ "Final", @@ -50429,10 +50048,9 @@ } ], "declKind": "Func", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)startTransactionWithContext:", - "mangledName": "$s6Sentry0A3SDKC16startTransaction18transactionContextSo0A4Span_pSo0adF0C_tFZ", + "usr": "c:@M@Sentry@objc(cs)SentryHub(im)startTransactionWithContext:", + "mangledName": "$s6Sentry0A3HubC16startTransaction18transactionContextSo0A4Span_pSo0adF0C_tF", "moduleName": "Sentry", - "static": true, "objc_name": "startTransactionWithContext:", "declAttributes": [ "Final", @@ -50466,10 +50084,9 @@ } ], "declKind": "Func", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)startTransactionWithContext:bindToScope:", - "mangledName": "$s6Sentry0A3SDKC16startTransaction18transactionContext11bindToScopeSo0A4Span_pSo0adF0C_SbtFZ", + "usr": "c:@M@Sentry@objc(cs)SentryHub(im)startTransactionWithContext:bindToScope:", + "mangledName": "$s6Sentry0A3HubC16startTransaction18transactionContext11bindToScopeSo0A4Span_pSo0adF0C_SbtF", "moduleName": "Sentry", - "static": true, "objc_name": "startTransactionWithContext:bindToScope:", "declAttributes": [ "Final", @@ -50522,10 +50139,9 @@ } ], "declKind": "Func", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)startTransactionWithContext:bindToScope:customSamplingContext:", - "mangledName": "$s6Sentry0A3SDKC16startTransaction18transactionContext11bindToScope014customSamplingF0So0A4Span_pSo0adF0C_SbSDySSypGtFZ", + "usr": "c:@M@Sentry@objc(cs)SentryHub(im)startTransactionWithContext:bindToScope:customSamplingContext:", + "mangledName": "$s6Sentry0A3HubC16startTransaction18transactionContext11bindToScope014customSamplingF0So0A4Span_pSo0adF0C_SbSDySSypGtF", "moduleName": "Sentry", - "static": true, "objc_name": "startTransactionWithContext:bindToScope:customSamplingContext:", "declAttributes": [ "Final", @@ -50572,10 +50188,9 @@ } ], "declKind": "Func", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)startTransactionWithContext:customSamplingContext:", - "mangledName": "$s6Sentry0A3SDKC16startTransaction18transactionContext014customSamplingF0So0A4Span_pSo0adF0C_SDySSypGtFZ", + "usr": "c:@M@Sentry@objc(cs)SentryHub(im)startTransactionWithContext:customSamplingContext:", + "mangledName": "$s6Sentry0A3HubC16startTransaction18transactionContext014customSamplingF0So0A4Span_pSo0adF0C_SDySSypGtF", "moduleName": "Sentry", - "static": true, "objc_name": "startTransactionWithContext:customSamplingContext:", "declAttributes": [ "Final", @@ -50593,20 +50208,19 @@ "kind": "TypeNominal", "name": "SentryId", "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" + "usr": "c:objc(cs)SentryId" }, { "kind": "TypeNominal", - "name": "Error", - "printedName": "any Swift.Error", - "usr": "s:s5ErrorP" + "name": "NSError", + "printedName": "Foundation.NSError", + "usr": "c:objc(cs)NSError" } ], "declKind": "Func", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)captureError:", - "mangledName": "$s6Sentry0A3SDKC7capture5errorAA0A2IdCs5Error_p_tFZ", + "usr": "c:@M@Sentry@objc(cs)SentryHub(im)captureError:", + "mangledName": "$s6Sentry0A3HubC7capture5errorSo0A2IdCSo7NSErrorC_tF", "moduleName": "Sentry", - "static": true, "objc_name": "captureError:", "declAttributes": [ "Final", @@ -50624,7 +50238,7 @@ "kind": "TypeNominal", "name": "SentryId", "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" + "usr": "c:objc(cs)SentryId" }, { "kind": "TypeNominal", @@ -50640,10 +50254,9 @@ } ], "declKind": "Func", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)captureError:withScope:", - "mangledName": "$s6Sentry0A3SDKC7capture5error5scopeAA0A2IdCs5Error_p_So0A5ScopeCtFZ", + "usr": "c:@M@Sentry@objc(cs)SentryHub(im)captureError:withScope:", + "mangledName": "$s6Sentry0A3HubC7capture5error5scopeSo0A2IdCs5Error_p_So0A5ScopeCtF", "moduleName": "Sentry", - "static": true, "objc_name": "captureError:withScope:", "declAttributes": [ "Final", @@ -50652,62 +50265,6 @@ ], "funcSelfKind": "NonMutating" }, - { - "kind": "Function", - "name": "capture", - "printedName": "capture(error:block:)", - "children": [ - { - "kind": "TypeNominal", - "name": "SentryId", - "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" - }, - { - "kind": "TypeNominal", - "name": "Error", - "printedName": "any Swift.Error", - "usr": "s:s5ErrorP" - }, - { - "kind": "TypeFunc", - "name": "Function", - "printedName": "(Sentry.Scope) -> Swift.Void", - "children": [ - { - "kind": "TypeNameAlias", - "name": "Void", - "printedName": "Swift.Void", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - } - ] - }, - { - "kind": "TypeNominal", - "name": "Scope", - "printedName": "Sentry.Scope", - "usr": "c:objc(cs)SentryScope" - } - ] - } - ], - "declKind": "Func", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)captureError:withScopeBlock:", - "mangledName": "$s6Sentry0A3SDKC7capture5error5blockAA0A2IdCs5Error_p_ySo0A5ScopeCctFZ", - "moduleName": "Sentry", - "static": true, - "objc_name": "captureError:withScopeBlock:", - "declAttributes": [ - "Final", - "ObjC", - "DiscardableResult" - ], - "funcSelfKind": "NonMutating" - }, { "kind": "Function", "name": "capture", @@ -50717,7 +50274,7 @@ "kind": "TypeNominal", "name": "SentryId", "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" + "usr": "c:objc(cs)SentryId" }, { "kind": "TypeNominal", @@ -50727,10 +50284,9 @@ } ], "declKind": "Func", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)captureException:", - "mangledName": "$s6Sentry0A3SDKC7capture9exceptionAA0A2IdCSo11NSExceptionC_tFZ", + "usr": "c:@M@Sentry@objc(cs)SentryHub(im)captureException:", + "mangledName": "$s6Sentry0A3HubC7capture9exceptionSo0A2IdCSo11NSExceptionC_tF", "moduleName": "Sentry", - "static": true, "objc_name": "captureException:", "declAttributes": [ "Final", @@ -50748,7 +50304,7 @@ "kind": "TypeNominal", "name": "SentryId", "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" + "usr": "c:objc(cs)SentryId" }, { "kind": "TypeNominal", @@ -50764,10 +50320,9 @@ } ], "declKind": "Func", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)captureException:withScope:", - "mangledName": "$s6Sentry0A3SDKC7capture9exception5scopeAA0A2IdCSo11NSExceptionC_So0A5ScopeCtFZ", + "usr": "c:@M@Sentry@objc(cs)SentryHub(im)captureException:withScope:", + "mangledName": "$s6Sentry0A3HubC7capture9exception5scopeSo0A2IdCSo11NSExceptionC_So0A5ScopeCtF", "moduleName": "Sentry", - "static": true, "objc_name": "captureException:withScope:", "declAttributes": [ "Final", @@ -50776,62 +50331,6 @@ ], "funcSelfKind": "NonMutating" }, - { - "kind": "Function", - "name": "capture", - "printedName": "capture(exception:block:)", - "children": [ - { - "kind": "TypeNominal", - "name": "SentryId", - "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" - }, - { - "kind": "TypeNominal", - "name": "NSException", - "printedName": "Foundation.NSException", - "usr": "c:objc(cs)NSException" - }, - { - "kind": "TypeFunc", - "name": "Function", - "printedName": "(Sentry.Scope) -> Swift.Void", - "children": [ - { - "kind": "TypeNameAlias", - "name": "Void", - "printedName": "Swift.Void", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - } - ] - }, - { - "kind": "TypeNominal", - "name": "Scope", - "printedName": "Sentry.Scope", - "usr": "c:objc(cs)SentryScope" - } - ] - } - ], - "declKind": "Func", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)captureException:withScopeBlock:", - "mangledName": "$s6Sentry0A3SDKC7capture9exception5blockAA0A2IdCSo11NSExceptionC_ySo0A5ScopeCctFZ", - "moduleName": "Sentry", - "static": true, - "objc_name": "captureException:withScopeBlock:", - "declAttributes": [ - "Final", - "ObjC", - "DiscardableResult" - ], - "funcSelfKind": "NonMutating" - }, { "kind": "Function", "name": "capture", @@ -50841,7 +50340,7 @@ "kind": "TypeNominal", "name": "SentryId", "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" + "usr": "c:objc(cs)SentryId" }, { "kind": "TypeNominal", @@ -50851,10 +50350,9 @@ } ], "declKind": "Func", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)captureMessage:", - "mangledName": "$s6Sentry0A3SDKC7capture7messageAA0A2IdCSS_tFZ", + "usr": "c:@M@Sentry@objc(cs)SentryHub(im)captureMessage:", + "mangledName": "$s6Sentry0A3HubC7capture7messageSo0A2IdCSS_tF", "moduleName": "Sentry", - "static": true, "objc_name": "captureMessage:", "declAttributes": [ "Final", @@ -50866,180 +50364,43 @@ { "kind": "Function", "name": "capture", - "printedName": "capture(message:scope:)", - "children": [ - { - "kind": "TypeNominal", - "name": "SentryId", - "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" - }, - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - }, - { - "kind": "TypeNominal", - "name": "Scope", - "printedName": "Sentry.Scope", - "usr": "c:objc(cs)SentryScope" - } - ], - "declKind": "Func", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)captureMessage:withScope:", - "mangledName": "$s6Sentry0A3SDKC7capture7message5scopeAA0A2IdCSS_So0A5ScopeCtFZ", - "moduleName": "Sentry", - "static": true, - "objc_name": "captureMessage:withScope:", - "declAttributes": [ - "Final", - "ObjC", - "DiscardableResult" - ], - "funcSelfKind": "NonMutating" - }, - { - "kind": "Function", - "name": "capture", - "printedName": "capture(message:block:)", - "children": [ - { - "kind": "TypeNominal", - "name": "SentryId", - "printedName": "Sentry.SentryId", - "usr": "c:@M@Sentry@objc(cs)SentryId" - }, - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - }, - { - "kind": "TypeFunc", - "name": "Function", - "printedName": "(Sentry.Scope) -> Swift.Void", - "children": [ - { - "kind": "TypeNameAlias", - "name": "Void", - "printedName": "Swift.Void", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - } - ] - }, - { - "kind": "TypeNominal", - "name": "Scope", - "printedName": "Sentry.Scope", - "usr": "c:objc(cs)SentryScope" - } - ] - } - ], - "declKind": "Func", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)captureMessage:withScopeBlock:", - "mangledName": "$s6Sentry0A3SDKC7capture7message5blockAA0A2IdCSS_ySo0A5ScopeCctFZ", - "moduleName": "Sentry", - "static": true, - "objc_name": "captureMessage:withScopeBlock:", - "declAttributes": [ - "Final", - "ObjC", - "DiscardableResult" - ], - "funcSelfKind": "NonMutating" - }, - { - "kind": "Function", - "name": "capture", - "printedName": "capture(feedback:)", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - }, - { - "kind": "TypeNominal", - "name": "SentryFeedback", - "printedName": "Sentry.SentryFeedback", - "usr": "c:@M@Sentry@objc(cs)SentryFeedback" - } - ], - "declKind": "Func", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)captureFeedback:", - "mangledName": "$s6Sentry0A3SDKC7capture8feedbackyAA0A8FeedbackC_tFZ", - "moduleName": "Sentry", - "static": true, - "objc_name": "captureFeedback:", - "declAttributes": [ - "Final", - "ObjC" - ], - "funcSelfKind": "NonMutating" - }, - { - "kind": "Var", - "name": "feedback", - "printedName": "feedback", + "printedName": "capture(message:scope:)", "children": [ { "kind": "TypeNominal", - "name": "SentryFeedbackAPI", - "printedName": "Sentry.SentryFeedbackAPI", - "usr": "c:objc(cs)SentryFeedbackAPI" + "name": "SentryId", + "printedName": "Sentry.SentryId", + "usr": "c:objc(cs)SentryId" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "Scope", + "printedName": "Sentry.Scope", + "usr": "c:objc(cs)SentryScope" } ], - "declKind": "Var", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cpy)feedback", - "mangledName": "$s6Sentry0A3SDKC8feedbackSo0A11FeedbackAPICvpZ", + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentryHub(im)captureMessage:withScope:", + "mangledName": "$s6Sentry0A3HubC7capture7message5scopeSo0A2IdCSS_So0A5ScopeCtF", "moduleName": "Sentry", - "static": true, + "objc_name": "captureMessage:withScope:", "declAttributes": [ "Final", "ObjC", - "HasStorage" + "DiscardableResult" ], - "isLet": true, - "hasStorage": true, - "accessors": [ - { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ - { - "kind": "TypeNominal", - "name": "SentryFeedbackAPI", - "printedName": "Sentry.SentryFeedbackAPI", - "usr": "c:objc(cs)SentryFeedbackAPI" - } - ], - "declKind": "Accessor", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)feedback", - "mangledName": "$s6Sentry0A3SDKC8feedbackSo0A11FeedbackAPICvgZ", - "moduleName": "Sentry", - "static": true, - "implicit": true, - "declAttributes": [ - "Final", - "ObjC" - ], - "accessorKind": "get" - } - ] + "funcSelfKind": "NonMutating" }, { "kind": "Function", - "name": "addBreadcrumb", - "printedName": "addBreadcrumb(_:)", + "name": "capture", + "printedName": "capture(feedback:)", "children": [ { "kind": "TypeNominal", @@ -51048,17 +50409,16 @@ }, { "kind": "TypeNominal", - "name": "Breadcrumb", - "printedName": "Sentry.Breadcrumb", - "usr": "c:objc(cs)SentryBreadcrumb" + "name": "SentryFeedback", + "printedName": "Sentry.SentryFeedback", + "usr": "c:@M@Sentry@objc(cs)SentryFeedback" } ], "declKind": "Func", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)addBreadcrumb:", - "mangledName": "$s6Sentry0A3SDKC13addBreadcrumbyySo0aD0CFZ", + "usr": "c:@M@Sentry@objc(cs)SentryHub(im)captureFeedback:", + "mangledName": "$s6Sentry0A3HubC7capture8feedbackyAA0A8FeedbackC_tF", "moduleName": "Sentry", - "static": true, - "objc_name": "addBreadcrumb:", + "objc_name": "captureFeedback:", "declAttributes": [ "Final", "ObjC" @@ -51102,11 +50462,9 @@ } ], "declKind": "Func", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)configureScope:", - "mangledName": "$s6Sentry0A3SDKC14configureScopeyyySo0aD0CcFZ", + "usr": "c:@M@Sentry@objc(cs)SentryHub(im)configureScope:", + "mangledName": "$s6Sentry0A3HubC14configureScopeyyySo0aD0CcF", "moduleName": "Sentry", - "static": true, - "objc_name": "configureScope:", "declAttributes": [ "Final", "ObjC" @@ -51114,69 +50472,79 @@ "funcSelfKind": "NonMutating" }, { - "kind": "Var", - "name": "crashedLastRun", - "printedName": "crashedLastRun", + "kind": "Function", + "name": "add", + "printedName": "add(_:)", "children": [ { "kind": "TypeNominal", - "name": "Bool", - "printedName": "Swift.Bool", - "usr": "s:Sb" + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Breadcrumb", + "printedName": "Sentry.Breadcrumb", + "usr": "c:objc(cs)SentryBreadcrumb" } ], - "declKind": "Var", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cpy)crashedLastRun", - "mangledName": "$s6Sentry0A3SDKC14crashedLastRunSbvpZ", + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentryHub(im)addBreadcrumb:", + "mangledName": "$s6Sentry0A3HubC3addyySo0A10BreadcrumbCF", "moduleName": "Sentry", - "static": true, + "objc_name": "addBreadcrumb:", "declAttributes": [ "Final", "ObjC" ], - "accessors": [ + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "getClient", + "printedName": "getClient()", + "children": [ { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Sentry.SentryClient?", "children": [ { "kind": "TypeNominal", - "name": "Bool", - "printedName": "Swift.Bool", - "usr": "s:Sb" + "name": "SentryClient", + "printedName": "Sentry.SentryClient", + "usr": "c:@M@Sentry@objc(cs)SentryClient" } ], - "declKind": "Accessor", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)crashedLastRun", - "mangledName": "$s6Sentry0A3SDKC14crashedLastRunSbvgZ", - "moduleName": "Sentry", - "static": true, - "declAttributes": [ - "Final", - "ObjC" - ], - "accessorKind": "get" + "usr": "s:Sq" } - ] + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentryHub(im)getClient", + "mangledName": "$s6Sentry0A3HubC9getClientAA0aD0CSgyF", + "moduleName": "Sentry", + "declAttributes": [ + "Final", + "ObjC" + ], + "funcSelfKind": "NonMutating" }, { "kind": "Var", - "name": "detectedStartUpCrash", - "printedName": "detectedStartUpCrash", + "name": "scope", + "printedName": "scope", "children": [ { "kind": "TypeNominal", - "name": "Bool", - "printedName": "Swift.Bool", - "usr": "s:Sb" + "name": "Scope", + "printedName": "Sentry.Scope", + "usr": "c:objc(cs)SentryScope" } ], "declKind": "Var", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cpy)detectedStartUpCrash", - "mangledName": "$s6Sentry0A3SDKC20detectedStartUpCrashSbvpZ", + "usr": "c:@M@Sentry@objc(cs)SentryHub(py)scope", + "mangledName": "$s6Sentry0A3HubC5scopeSo0A5ScopeCvp", "moduleName": "Sentry", - "static": true, "declAttributes": [ "Final", "ObjC" @@ -51189,16 +50557,15 @@ "children": [ { "kind": "TypeNominal", - "name": "Bool", - "printedName": "Swift.Bool", - "usr": "s:Sb" + "name": "Scope", + "printedName": "Sentry.Scope", + "usr": "c:objc(cs)SentryScope" } ], "declKind": "Accessor", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)detectedStartUpCrash", - "mangledName": "$s6Sentry0A3SDKC20detectedStartUpCrashSbvgZ", + "usr": "c:@M@Sentry@objc(cs)SentryHub(im)scope", + "mangledName": "$s6Sentry0A3HubC5scopeSo0A5ScopeCvg", "moduleName": "Sentry", - "static": true, "declAttributes": [ "Final", "ObjC" @@ -51209,8 +50576,8 @@ }, { "kind": "Function", - "name": "setUser", - "printedName": "setUser(_:)", + "name": "bindClient", + "printedName": "bindClient(_:)", "children": [ { "kind": "TypeNominal", @@ -51220,23 +50587,22 @@ { "kind": "TypeNominal", "name": "Optional", - "printedName": "Sentry.User?", + "printedName": "Sentry.SentryClient?", "children": [ { "kind": "TypeNominal", - "name": "User", - "printedName": "Sentry.User", - "usr": "c:objc(cs)SentryUser" + "name": "SentryClient", + "printedName": "Sentry.SentryClient", + "usr": "c:@M@Sentry@objc(cs)SentryClient" } ], "usr": "s:Sq" } ], "declKind": "Func", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)setUser:", - "mangledName": "$s6Sentry0A3SDKC7setUseryySo0aD0CSgFZ", + "usr": "c:@M@Sentry@objc(cs)SentryHub(im)bindClient:", + "mangledName": "$s6Sentry0A3HubC10bindClientyyAA0aD0CSgF", "moduleName": "Sentry", - "static": true, "declAttributes": [ "Final", "ObjC" @@ -51245,42 +50611,26 @@ }, { "kind": "Function", - "name": "startSession", - "printedName": "startSession()", + "name": "hasIntegration", + "printedName": "hasIntegration(_:)", "children": [ { "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - } - ], - "declKind": "Func", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)startSession", - "mangledName": "$s6Sentry0A3SDKC12startSessionyyFZ", - "moduleName": "Sentry", - "static": true, - "declAttributes": [ - "Final", - "ObjC" - ], - "funcSelfKind": "NonMutating" - }, - { - "kind": "Function", - "name": "endSession", - "printedName": "endSession()", - "children": [ + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + }, { "kind": "TypeNominal", - "name": "Void", - "printedName": "()" + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" } ], "declKind": "Func", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)endSession", - "mangledName": "$s6Sentry0A3SDKC10endSessionyyFZ", + "usr": "c:@M@Sentry@objc(cs)SentryHub(im)hasIntegration:", + "mangledName": "$s6Sentry0A3HubC14hasIntegrationySbSSF", "moduleName": "Sentry", - "static": true, "declAttributes": [ "Final", "ObjC" @@ -51289,20 +50639,53 @@ }, { "kind": "Function", - "name": "crash", - "printedName": "crash()", + "name": "isIntegrationInstalled", + "printedName": "isIntegrationInstalled(_:)", "children": [ { "kind": "TypeNominal", - "name": "Void", - "printedName": "()" + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + }, + { + "kind": "TypeNameAlias", + "name": "AnyClass", + "printedName": "Swift.AnyClass", + "children": [ + { + "kind": "TypeNominal", + "name": "ExistentialMetatype", + "printedName": "any Swift.AnyObject.Type", + "children": [ + { + "kind": "TypeNameAlias", + "name": "AnyObject", + "printedName": "Swift.AnyObject", + "children": [ + { + "kind": "TypeNameAlias", + "name": "AnyObject", + "printedName": "Builtin.AnyObject", + "children": [ + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "AnyObject" + } + ] + } + ] + } + ] + } + ] } ], "declKind": "Func", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)crash", - "mangledName": "$s6Sentry0A3SDKC5crashyyFZ", + "usr": "c:@M@Sentry@objc(cs)SentryHub(im)isIntegrationInstalled:", + "mangledName": "$s6Sentry0A3HubC22isIntegrationInstalledySbyXlXpF", "moduleName": "Sentry", - "static": true, "declAttributes": [ "Final", "ObjC" @@ -51311,42 +50694,33 @@ }, { "kind": "Function", - "name": "reportFullyDisplayed", - "printedName": "reportFullyDisplayed()", + "name": "setUser", + "printedName": "setUser(_:)", "children": [ { "kind": "TypeNominal", "name": "Void", "printedName": "()" - } - ], - "declKind": "Func", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)reportFullyDisplayed", - "mangledName": "$s6Sentry0A3SDKC20reportFullyDisplayedyyFZ", - "moduleName": "Sentry", - "static": true, - "declAttributes": [ - "Final", - "ObjC" - ], - "funcSelfKind": "NonMutating" - }, - { - "kind": "Function", - "name": "pauseAppHangTracking", - "printedName": "pauseAppHangTracking()", - "children": [ + }, { "kind": "TypeNominal", - "name": "Void", - "printedName": "()" + "name": "Optional", + "printedName": "Sentry.User?", + "children": [ + { + "kind": "TypeNominal", + "name": "User", + "printedName": "Sentry.User", + "usr": "c:objc(cs)SentryUser" + } + ], + "usr": "s:Sq" } ], "declKind": "Func", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)pauseAppHangTracking", - "mangledName": "$s6Sentry0A3SDKC20pauseAppHangTrackingyyFZ", + "usr": "c:@M@Sentry@objc(cs)SentryHub(im)setUser:", + "mangledName": "$s6Sentry0A3HubC7setUseryySo0aD0CSgF", "moduleName": "Sentry", - "static": true, "declAttributes": [ "Final", "ObjC" @@ -51355,8 +50729,8 @@ }, { "kind": "Function", - "name": "resumeAppHangTracking", - "printedName": "resumeAppHangTracking()", + "name": "reportFullyDisplayed", + "printedName": "reportFullyDisplayed()", "children": [ { "kind": "TypeNominal", @@ -51365,10 +50739,9 @@ } ], "declKind": "Func", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)resumeAppHangTracking", - "mangledName": "$s6Sentry0A3SDKC21resumeAppHangTrackingyyFZ", + "usr": "c:@M@Sentry@objc(cs)SentryHub(im)reportFullyDisplayed", + "mangledName": "$s6Sentry0A3HubC20reportFullyDisplayedyyF", "moduleName": "Sentry", - "static": true, "declAttributes": [ "Final", "ObjC" @@ -51400,10 +50773,9 @@ } ], "declKind": "Func", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)flush:", - "mangledName": "$s6Sentry0A3SDKC5flush7timeoutySd_tFZ", + "usr": "c:@M@Sentry@objc(cs)SentryHub(im)flush:", + "mangledName": "$s6Sentry0A3HubC5flush7timeoutySd_tF", "moduleName": "Sentry", - "static": true, "objc_name": "flush:", "declAttributes": [ "Final", @@ -51423,212 +50795,9 @@ } ], "declKind": "Func", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)close", - "mangledName": "$s6Sentry0A3SDKC5closeyyFZ", - "moduleName": "Sentry", - "static": true, - "declAttributes": [ - "Final", - "ObjC" - ], - "funcSelfKind": "NonMutating" - }, - { - "kind": "Function", - "name": "startProfiler", - "printedName": "startProfiler()", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - } - ], - "declKind": "Func", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)startProfiler", - "mangledName": "$s6Sentry0A3SDKC13startProfileryyFZ", - "moduleName": "Sentry", - "static": true, - "declAttributes": [ - "Final", - "ObjC" - ], - "funcSelfKind": "NonMutating" - }, - { - "kind": "Function", - "name": "stopProfiler", - "printedName": "stopProfiler()", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - } - ], - "declKind": "Func", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(cm)stopProfiler", - "mangledName": "$s6Sentry0A3SDKC12stopProfileryyFZ", - "moduleName": "Sentry", - "static": true, - "declAttributes": [ - "Final", - "ObjC" - ], - "funcSelfKind": "NonMutating" - }, - { - "kind": "Constructor", - "name": "init", - "printedName": "init()", - "children": [ - { - "kind": "TypeNominal", - "name": "SentrySDK", - "printedName": "Sentry.SentrySDK", - "usr": "c:@M@Sentry@objc(cs)SentrySDK" - } - ], - "declKind": "Constructor", - "usr": "c:@M@Sentry@objc(cs)SentrySDK(im)init", - "mangledName": "$s6Sentry0A3SDKCACycfc", - "moduleName": "Sentry", - "overriding": true, - "objc_name": "init", - "declAttributes": [ - "ObjC", - "Dynamic", - "Override" - ], - "init_kind": "Designated" - } - ], - "declKind": "Class", - "usr": "c:@M@Sentry@objc(cs)SentrySDK", - "mangledName": "$s6Sentry0A3SDKC", - "moduleName": "Sentry", - "isOpen": true, - "declAttributes": [ - "ObjC" - ], - "superclassUsr": "c:objc(cs)NSObject", - "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": "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", + "usr": "c:@M@Sentry@objc(cs)SentryHub(im)close", + "mangledName": "$s6Sentry0A3HubC5closeyyF", "moduleName": "Sentry", - "static": true, "declAttributes": [ "Final", "ObjC" @@ -51637,17 +50806,14 @@ } ], "declKind": "Class", - "usr": "c:@M@Sentry@objc(cs)SentryRedactViewHelper", - "mangledName": "$s6Sentry0A16RedactViewHelperC", + "usr": "c:@M@Sentry@objc(cs)SentryHub", + "mangledName": "$s6Sentry0A3HubC", "moduleName": "Sentry", "declAttributes": [ "Final", - "ObjCMembers", "ObjC" ], "superclassUsr": "c:objc(cs)NSObject", - "hasMissingDesignatedInitializers": true, - "inheritsConvenienceInitializers": true, "superclassNames": [ "ObjectiveC.NSObject" ], @@ -54832,8 +53998,464 @@ } ], "declKind": "Var", - "usr": "c:@M@Sentry@objc(cs)SentryUserFeedbackWidgetConfiguration(py)widgetAccessibilityLabel", - "mangledName": "$s6Sentry0A31UserFeedbackWidgetConfigurationC24widgetAccessibilityLabelSSSgvp", + "usr": "c:@M@Sentry@objc(cs)SentryUserFeedbackWidgetConfiguration(py)widgetAccessibilityLabel", + "mangledName": "$s6Sentry0A31UserFeedbackWidgetConfigurationC24widgetAccessibilityLabelSSSgvp", + "moduleName": "Sentry", + "declAttributes": [ + "Final", + "ObjC" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@Sentry@objc(cs)SentryUserFeedbackWidgetConfiguration(im)widgetAccessibilityLabel", + "mangledName": "$s6Sentry0A31UserFeedbackWidgetConfigurationC24widgetAccessibilityLabelSSSgvg", + "moduleName": "Sentry", + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:@M@Sentry@objc(cs)SentryUserFeedbackWidgetConfiguration(im)setWidgetAccessibilityLabel:", + "mangledName": "$s6Sentry0A31UserFeedbackWidgetConfigurationC24widgetAccessibilityLabelSSSgvs", + "moduleName": "Sentry", + "objc_name": "setWidgetAccessibilityLabel:", + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "set" + } + ] + }, + { + "kind": "Var", + "name": "windowLevel", + "printedName": "windowLevel", + "children": [ + { + "kind": "TypeNominal", + "name": "Level", + "printedName": "UIKit.UIWindow.Level", + "usr": "c:@T@UIWindowLevel" + } + ], + "declKind": "Var", + "usr": "c:@M@Sentry@objc(cs)SentryUserFeedbackWidgetConfiguration(py)windowLevel", + "mangledName": "$s6Sentry0A31UserFeedbackWidgetConfigurationC11windowLevelSo08UIWindowG0avp", + "moduleName": "Sentry", + "declAttributes": [ + "Final", + "ObjC", + "HasStorage" + ], + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Level", + "printedName": "UIKit.UIWindow.Level", + "usr": "c:@T@UIWindowLevel" + } + ], + "declKind": "Accessor", + "usr": "c:@M@Sentry@objc(cs)SentryUserFeedbackWidgetConfiguration(im)windowLevel", + "mangledName": "$s6Sentry0A31UserFeedbackWidgetConfigurationC11windowLevelSo08UIWindowG0avg", + "moduleName": "Sentry", + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Level", + "printedName": "UIKit.UIWindow.Level", + "usr": "c:@T@UIWindowLevel" + } + ], + "declKind": "Accessor", + "usr": "c:@M@Sentry@objc(cs)SentryUserFeedbackWidgetConfiguration(im)setWindowLevel:", + "mangledName": "$s6Sentry0A31UserFeedbackWidgetConfigurationC11windowLevelSo08UIWindowG0avs", + "moduleName": "Sentry", + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "set" + } + ] + }, + { + "kind": "Var", + "name": "location", + "printedName": "location", + "children": [ + { + "kind": "TypeNominal", + "name": "NSDirectionalRectEdge", + "printedName": "UIKit.NSDirectionalRectEdge", + "usr": "c:@E@NSDirectionalRectEdge" + } + ], + "declKind": "Var", + "usr": "c:@M@Sentry@objc(cs)SentryUserFeedbackWidgetConfiguration(py)location", + "mangledName": "$s6Sentry0A31UserFeedbackWidgetConfigurationC8locationSo21NSDirectionalRectEdgeVvp", + "moduleName": "Sentry", + "declAttributes": [ + "Final", + "ObjC", + "HasStorage" + ], + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "NSDirectionalRectEdge", + "printedName": "UIKit.NSDirectionalRectEdge", + "usr": "c:@E@NSDirectionalRectEdge" + } + ], + "declKind": "Accessor", + "usr": "c:@M@Sentry@objc(cs)SentryUserFeedbackWidgetConfiguration(im)location", + "mangledName": "$s6Sentry0A31UserFeedbackWidgetConfigurationC8locationSo21NSDirectionalRectEdgeVvg", + "moduleName": "Sentry", + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "NSDirectionalRectEdge", + "printedName": "UIKit.NSDirectionalRectEdge", + "usr": "c:@E@NSDirectionalRectEdge" + } + ], + "declKind": "Accessor", + "usr": "c:@M@Sentry@objc(cs)SentryUserFeedbackWidgetConfiguration(im)setLocation:", + "mangledName": "$s6Sentry0A31UserFeedbackWidgetConfigurationC8locationSo21NSDirectionalRectEdgeVvs", + "moduleName": "Sentry", + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "set" + } + ] + }, + { + "kind": "Var", + "name": "layoutUIOffset", + "printedName": "layoutUIOffset", + "children": [ + { + "kind": "TypeNominal", + "name": "UIOffset", + "printedName": "UIKit.UIOffset", + "usr": "c:@S@UIOffset" + } + ], + "declKind": "Var", + "usr": "c:@M@Sentry@objc(cs)SentryUserFeedbackWidgetConfiguration(py)layoutUIOffset", + "mangledName": "$s6Sentry0A31UserFeedbackWidgetConfigurationC14layoutUIOffsetSo0G0Vvp", + "moduleName": "Sentry", + "declAttributes": [ + "Final", + "ObjC", + "HasStorage" + ], + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "UIOffset", + "printedName": "UIKit.UIOffset", + "usr": "c:@S@UIOffset" + } + ], + "declKind": "Accessor", + "usr": "c:@M@Sentry@objc(cs)SentryUserFeedbackWidgetConfiguration(im)layoutUIOffset", + "mangledName": "$s6Sentry0A31UserFeedbackWidgetConfigurationC14layoutUIOffsetSo0G0Vvg", + "moduleName": "Sentry", + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "UIOffset", + "printedName": "UIKit.UIOffset", + "usr": "c:@S@UIOffset" + } + ], + "declKind": "Accessor", + "usr": "c:@M@Sentry@objc(cs)SentryUserFeedbackWidgetConfiguration(im)setLayoutUIOffset:", + "mangledName": "$s6Sentry0A31UserFeedbackWidgetConfigurationC14layoutUIOffsetSo0G0Vvs", + "moduleName": "Sentry", + "implicit": true, + "declAttributes": [ + "Final", + "ObjC" + ], + "accessorKind": "set" + } + ] + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "SentryUserFeedbackWidgetConfiguration", + "printedName": "Sentry.SentryUserFeedbackWidgetConfiguration", + "usr": "c:@M@Sentry@objc(cs)SentryUserFeedbackWidgetConfiguration" + } + ], + "declKind": "Constructor", + "usr": "c:@M@Sentry@objc(cs)SentryUserFeedbackWidgetConfiguration(im)init", + "mangledName": "$s6Sentry0A31UserFeedbackWidgetConfigurationCACycfc", + "moduleName": "Sentry", + "overriding": true, + "objc_name": "init", + "declAttributes": [ + "ObjC", + "Dynamic", + "Override" + ], + "init_kind": "Designated" + } + ], + "declKind": "Class", + "usr": "c:@M@Sentry@objc(cs)SentryUserFeedbackWidgetConfiguration", + "mangledName": "$s6Sentry0A31UserFeedbackWidgetConfigurationC", + "moduleName": "Sentry", + "declAttributes": [ + "Final", + "ObjCMembers", + "ObjC" + ], + "superclassUsr": "c:objc(cs)NSObject", + "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": "SentryClient", + "printedName": "SentryClient", + "children": [ + { + "kind": "Constructor", + "name": "init", + "printedName": "init(options:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Sentry.SentryClient?", + "children": [ + { + "kind": "TypeNominal", + "name": "SentryClient", + "printedName": "Sentry.SentryClient", + "usr": "c:@M@Sentry@objc(cs)SentryClient" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Options", + "printedName": "Sentry.Options", + "usr": "c:objc(cs)SentryOptions" + } + ], + "declKind": "Constructor", + "usr": "c:@M@Sentry@objc(cs)SentryClient(im)initWithOptions:", + "mangledName": "$s6Sentry0A6ClientC7optionsACSgSo0A7OptionsC_tcfc", + "moduleName": "Sentry", + "objc_name": "initWithOptions:", + "declAttributes": [ + "ObjC" + ], + "init_kind": "Designated" + }, + { + "kind": "Var", + "name": "isEnabled", + "printedName": "isEnabled", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Var", + "usr": "c:@M@Sentry@objc(cs)SentryClient(py)isEnabled", + "mangledName": "$s6Sentry0A6ClientC9isEnabledSbvp", "moduleName": "Sentry", "declAttributes": [ "Final", @@ -54847,89 +54469,43 @@ "children": [ { "kind": "TypeNominal", - "name": "Optional", - "printedName": "Swift.String?", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "usr": "s:Sq" + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" } ], "declKind": "Accessor", - "usr": "c:@M@Sentry@objc(cs)SentryUserFeedbackWidgetConfiguration(im)widgetAccessibilityLabel", - "mangledName": "$s6Sentry0A31UserFeedbackWidgetConfigurationC24widgetAccessibilityLabelSSSgvg", + "usr": "c:@M@Sentry@objc(cs)SentryClient(im)isEnabled", + "mangledName": "$s6Sentry0A6ClientC9isEnabledSbvg", "moduleName": "Sentry", "declAttributes": [ "Final", "ObjC" ], "accessorKind": "get" - }, - { - "kind": "Accessor", - "name": "Set", - "printedName": "Set()", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - }, - { - "kind": "TypeNominal", - "name": "Optional", - "printedName": "Swift.String?", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "usr": "s:Sq" - } - ], - "declKind": "Accessor", - "usr": "c:@M@Sentry@objc(cs)SentryUserFeedbackWidgetConfiguration(im)setWidgetAccessibilityLabel:", - "mangledName": "$s6Sentry0A31UserFeedbackWidgetConfigurationC24widgetAccessibilityLabelSSSgvs", - "moduleName": "Sentry", - "objc_name": "setWidgetAccessibilityLabel:", - "declAttributes": [ - "Final", - "ObjC" - ], - "accessorKind": "set" } ] }, { "kind": "Var", - "name": "windowLevel", - "printedName": "windowLevel", + "name": "options", + "printedName": "options", "children": [ { "kind": "TypeNominal", - "name": "Level", - "printedName": "UIKit.UIWindow.Level", - "usr": "c:@T@UIWindowLevel" + "name": "Options", + "printedName": "Sentry.Options", + "usr": "c:objc(cs)SentryOptions" } ], "declKind": "Var", - "usr": "c:@M@Sentry@objc(cs)SentryUserFeedbackWidgetConfiguration(py)windowLevel", - "mangledName": "$s6Sentry0A31UserFeedbackWidgetConfigurationC11windowLevelSo08UIWindowG0avp", + "usr": "c:@M@Sentry@objc(cs)SentryClient(py)options", + "mangledName": "$s6Sentry0A6ClientC7optionsSo0A7OptionsCvp", "moduleName": "Sentry", "declAttributes": [ "Final", - "ObjC", - "HasStorage" + "ObjC" ], - "hasStorage": true, "accessors": [ { "kind": "Accessor", @@ -54938,16 +54514,15 @@ "children": [ { "kind": "TypeNominal", - "name": "Level", - "printedName": "UIKit.UIWindow.Level", - "usr": "c:@T@UIWindowLevel" + "name": "Options", + "printedName": "Sentry.Options", + "usr": "c:objc(cs)SentryOptions" } ], "declKind": "Accessor", - "usr": "c:@M@Sentry@objc(cs)SentryUserFeedbackWidgetConfiguration(im)windowLevel", - "mangledName": "$s6Sentry0A31UserFeedbackWidgetConfigurationC11windowLevelSo08UIWindowG0avg", + "usr": "c:@M@Sentry@objc(cs)SentryClient(im)options", + "mangledName": "$s6Sentry0A6ClientC7optionsSo0A7OptionsCvg", "moduleName": "Sentry", - "implicit": true, "declAttributes": [ "Final", "ObjC" @@ -54966,16 +54541,16 @@ }, { "kind": "TypeNominal", - "name": "Level", - "printedName": "UIKit.UIWindow.Level", - "usr": "c:@T@UIWindowLevel" + "name": "Options", + "printedName": "Sentry.Options", + "usr": "c:objc(cs)SentryOptions" } ], "declKind": "Accessor", - "usr": "c:@M@Sentry@objc(cs)SentryUserFeedbackWidgetConfiguration(im)setWindowLevel:", - "mangledName": "$s6Sentry0A31UserFeedbackWidgetConfigurationC11windowLevelSo08UIWindowG0avs", + "usr": "c:@M@Sentry@objc(cs)SentryClient(im)setOptions:", + "mangledName": "$s6Sentry0A6ClientC7optionsSo0A7OptionsCvs", "moduleName": "Sentry", - "implicit": true, + "objc_name": "setOptions:", "declAttributes": [ "Final", "ObjC" @@ -54985,194 +54560,370 @@ ] }, { - "kind": "Var", - "name": "location", - "printedName": "location", + "kind": "Function", + "name": "capture", + "printedName": "capture(event:)", "children": [ { "kind": "TypeNominal", - "name": "NSDirectionalRectEdge", - "printedName": "UIKit.NSDirectionalRectEdge", - "usr": "c:@E@NSDirectionalRectEdge" + "name": "SentryId", + "printedName": "Sentry.SentryId", + "usr": "c:objc(cs)SentryId" + }, + { + "kind": "TypeNominal", + "name": "Event", + "printedName": "Sentry.Event", + "usr": "c:objc(cs)SentryEvent" } ], - "declKind": "Var", - "usr": "c:@M@Sentry@objc(cs)SentryUserFeedbackWidgetConfiguration(py)location", - "mangledName": "$s6Sentry0A31UserFeedbackWidgetConfigurationC8locationSo21NSDirectionalRectEdgeVvp", + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentryClient(im)captureEvent:", + "mangledName": "$s6Sentry0A6ClientC7capture5eventSo0A2IdCSo0A5EventC_tF", "moduleName": "Sentry", + "objc_name": "captureEvent:", "declAttributes": [ "Final", "ObjC", - "HasStorage" + "DiscardableResult" ], - "hasStorage": true, - "accessors": [ + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "capture", + "printedName": "capture(event:scope:)", + "children": [ { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ - { - "kind": "TypeNominal", - "name": "NSDirectionalRectEdge", - "printedName": "UIKit.NSDirectionalRectEdge", - "usr": "c:@E@NSDirectionalRectEdge" - } - ], - "declKind": "Accessor", - "usr": "c:@M@Sentry@objc(cs)SentryUserFeedbackWidgetConfiguration(im)location", - "mangledName": "$s6Sentry0A31UserFeedbackWidgetConfigurationC8locationSo21NSDirectionalRectEdgeVvg", - "moduleName": "Sentry", - "implicit": true, - "declAttributes": [ - "Final", - "ObjC" - ], - "accessorKind": "get" + "kind": "TypeNominal", + "name": "SentryId", + "printedName": "Sentry.SentryId", + "usr": "c:objc(cs)SentryId" }, { - "kind": "Accessor", - "name": "Set", - "printedName": "Set()", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - }, - { - "kind": "TypeNominal", - "name": "NSDirectionalRectEdge", - "printedName": "UIKit.NSDirectionalRectEdge", - "usr": "c:@E@NSDirectionalRectEdge" - } - ], - "declKind": "Accessor", - "usr": "c:@M@Sentry@objc(cs)SentryUserFeedbackWidgetConfiguration(im)setLocation:", - "mangledName": "$s6Sentry0A31UserFeedbackWidgetConfigurationC8locationSo21NSDirectionalRectEdgeVvs", - "moduleName": "Sentry", - "implicit": true, - "declAttributes": [ - "Final", - "ObjC" - ], - "accessorKind": "set" + "kind": "TypeNominal", + "name": "Event", + "printedName": "Sentry.Event", + "usr": "c:objc(cs)SentryEvent" + }, + { + "kind": "TypeNominal", + "name": "Scope", + "printedName": "Sentry.Scope", + "usr": "c:objc(cs)SentryScope" } - ] + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentryClient(im)captureEvent:withScope:", + "mangledName": "$s6Sentry0A6ClientC7capture5event5scopeSo0A2IdCSo0A5EventC_So0A5ScopeCtF", + "moduleName": "Sentry", + "objc_name": "captureEvent:withScope:", + "declAttributes": [ + "Final", + "ObjC", + "DiscardableResult" + ], + "funcSelfKind": "NonMutating" }, { - "kind": "Var", - "name": "layoutUIOffset", - "printedName": "layoutUIOffset", + "kind": "Function", + "name": "capture", + "printedName": "capture(error:)", "children": [ { "kind": "TypeNominal", - "name": "UIOffset", - "printedName": "UIKit.UIOffset", - "usr": "c:@S@UIOffset" + "name": "SentryId", + "printedName": "Sentry.SentryId", + "usr": "c:objc(cs)SentryId" + }, + { + "kind": "TypeNominal", + "name": "Error", + "printedName": "any Swift.Error", + "usr": "s:s5ErrorP" } ], - "declKind": "Var", - "usr": "c:@M@Sentry@objc(cs)SentryUserFeedbackWidgetConfiguration(py)layoutUIOffset", - "mangledName": "$s6Sentry0A31UserFeedbackWidgetConfigurationC14layoutUIOffsetSo0G0Vvp", + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentryClient(im)captureError:", + "mangledName": "$s6Sentry0A6ClientC7capture5errorSo0A2IdCs5Error_p_tF", "moduleName": "Sentry", + "objc_name": "captureError:", "declAttributes": [ "Final", "ObjC", - "HasStorage" + "DiscardableResult" ], - "hasStorage": true, - "accessors": [ + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "capture", + "printedName": "capture(error:scope:)", + "children": [ { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ - { - "kind": "TypeNominal", - "name": "UIOffset", - "printedName": "UIKit.UIOffset", - "usr": "c:@S@UIOffset" - } - ], - "declKind": "Accessor", - "usr": "c:@M@Sentry@objc(cs)SentryUserFeedbackWidgetConfiguration(im)layoutUIOffset", - "mangledName": "$s6Sentry0A31UserFeedbackWidgetConfigurationC14layoutUIOffsetSo0G0Vvg", - "moduleName": "Sentry", - "implicit": true, - "declAttributes": [ - "Final", - "ObjC" - ], - "accessorKind": "get" + "kind": "TypeNominal", + "name": "SentryId", + "printedName": "Sentry.SentryId", + "usr": "c:objc(cs)SentryId" }, { - "kind": "Accessor", - "name": "Set", - "printedName": "Set()", + "kind": "TypeNominal", + "name": "Error", + "printedName": "any Swift.Error", + "usr": "s:s5ErrorP" + }, + { + "kind": "TypeNominal", + "name": "Scope", + "printedName": "Sentry.Scope", + "usr": "c:objc(cs)SentryScope" + } + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentryClient(im)captureError:withScope:", + "mangledName": "$s6Sentry0A6ClientC7capture5error5scopeSo0A2IdCs5Error_p_So0A5ScopeCtF", + "moduleName": "Sentry", + "objc_name": "captureError:withScope:", + "declAttributes": [ + "Final", + "ObjC", + "DiscardableResult" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "capture", + "printedName": "capture(exception:)", + "children": [ + { + "kind": "TypeNominal", + "name": "SentryId", + "printedName": "Sentry.SentryId", + "usr": "c:objc(cs)SentryId" + }, + { + "kind": "TypeNominal", + "name": "NSException", + "printedName": "Foundation.NSException", + "usr": "c:objc(cs)NSException" + } + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentryClient(im)captureException:", + "mangledName": "$s6Sentry0A6ClientC7capture9exceptionSo0A2IdCSo11NSExceptionC_tF", + "moduleName": "Sentry", + "objc_name": "captureException:", + "declAttributes": [ + "Final", + "ObjC", + "DiscardableResult" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "capture", + "printedName": "capture(exception:scope:)", + "children": [ + { + "kind": "TypeNominal", + "name": "SentryId", + "printedName": "Sentry.SentryId", + "usr": "c:objc(cs)SentryId" + }, + { + "kind": "TypeNominal", + "name": "NSException", + "printedName": "Foundation.NSException", + "usr": "c:objc(cs)NSException" + }, + { + "kind": "TypeNominal", + "name": "Scope", + "printedName": "Sentry.Scope", + "usr": "c:objc(cs)SentryScope" + } + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentryClient(im)captureException:withScope:", + "mangledName": "$s6Sentry0A6ClientC7capture9exception5scopeSo0A2IdCSo11NSExceptionC_So0A5ScopeCtF", + "moduleName": "Sentry", + "objc_name": "captureException:withScope:", + "declAttributes": [ + "Final", + "ObjC", + "DiscardableResult" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "capture", + "printedName": "capture(message:)", + "children": [ + { + "kind": "TypeNominal", + "name": "SentryId", + "printedName": "Sentry.SentryId", + "usr": "c:objc(cs)SentryId" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentryClient(im)captureMessage:", + "mangledName": "$s6Sentry0A6ClientC7capture7messageSo0A2IdCSS_tF", + "moduleName": "Sentry", + "objc_name": "captureMessage:", + "declAttributes": [ + "Final", + "ObjC", + "DiscardableResult" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "capture", + "printedName": "capture(message:scope:)", + "children": [ + { + "kind": "TypeNominal", + "name": "SentryId", + "printedName": "Sentry.SentryId", + "usr": "c:objc(cs)SentryId" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "Scope", + "printedName": "Sentry.Scope", + "usr": "c:objc(cs)SentryScope" + } + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentryClient(im)captureMessage:withScope:", + "mangledName": "$s6Sentry0A6ClientC7capture7message5scopeSo0A2IdCSS_So0A5ScopeCtF", + "moduleName": "Sentry", + "objc_name": "captureMessage:withScope:", + "declAttributes": [ + "Final", + "ObjC", + "DiscardableResult" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "capture", + "printedName": "capture(feedback:scope:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "SentryFeedback", + "printedName": "Sentry.SentryFeedback", + "usr": "c:@M@Sentry@objc(cs)SentryFeedback" + }, + { + "kind": "TypeNominal", + "name": "Scope", + "printedName": "Sentry.Scope", + "usr": "c:objc(cs)SentryScope" + } + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentryClient(im)captureFeedback:withScope:", + "mangledName": "$s6Sentry0A6ClientC7capture8feedback5scopeyAA0A8FeedbackC_So0A5ScopeCtF", + "moduleName": "Sentry", + "objc_name": "captureFeedback:withScope:", + "declAttributes": [ + "Final", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "flush", + "printedName": "flush(timeout:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNameAlias", + "name": "TimeInterval", + "printedName": "Foundation.TimeInterval", "children": [ { "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - }, - { - "kind": "TypeNominal", - "name": "UIOffset", - "printedName": "UIKit.UIOffset", - "usr": "c:@S@UIOffset" + "name": "Double", + "printedName": "Swift.Double", + "usr": "s:Sd" } - ], - "declKind": "Accessor", - "usr": "c:@M@Sentry@objc(cs)SentryUserFeedbackWidgetConfiguration(im)setLayoutUIOffset:", - "mangledName": "$s6Sentry0A31UserFeedbackWidgetConfigurationC14layoutUIOffsetSo0G0Vvs", - "moduleName": "Sentry", - "implicit": true, - "declAttributes": [ - "Final", - "ObjC" - ], - "accessorKind": "set" + ] } - ] + ], + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentryClient(im)flush:", + "mangledName": "$s6Sentry0A6ClientC5flush7timeoutySd_tF", + "moduleName": "Sentry", + "objc_name": "flush:", + "declAttributes": [ + "Final", + "ObjC" + ], + "funcSelfKind": "NonMutating" }, { - "kind": "Constructor", - "name": "init", - "printedName": "init()", + "kind": "Function", + "name": "close", + "printedName": "close()", "children": [ { "kind": "TypeNominal", - "name": "SentryUserFeedbackWidgetConfiguration", - "printedName": "Sentry.SentryUserFeedbackWidgetConfiguration", - "usr": "c:@M@Sentry@objc(cs)SentryUserFeedbackWidgetConfiguration" + "name": "Void", + "printedName": "()" } ], - "declKind": "Constructor", - "usr": "c:@M@Sentry@objc(cs)SentryUserFeedbackWidgetConfiguration(im)init", - "mangledName": "$s6Sentry0A31UserFeedbackWidgetConfigurationCACycfc", + "declKind": "Func", + "usr": "c:@M@Sentry@objc(cs)SentryClient(im)close", + "mangledName": "$s6Sentry0A6ClientC5closeyyF", "moduleName": "Sentry", - "overriding": true, - "objc_name": "init", "declAttributes": [ - "ObjC", - "Dynamic", - "Override" + "Final", + "ObjC" ], - "init_kind": "Designated" + "funcSelfKind": "NonMutating" } ], "declKind": "Class", - "usr": "c:@M@Sentry@objc(cs)SentryUserFeedbackWidgetConfiguration", - "mangledName": "$s6Sentry0A31UserFeedbackWidgetConfigurationC", + "usr": "c:@M@Sentry@objc(cs)SentryClient", + "mangledName": "$s6Sentry0A6ClientC", "moduleName": "Sentry", "declAttributes": [ "Final", - "ObjCMembers", "ObjC" ], "superclassUsr": "c:objc(cs)NSObject", - "inheritsConvenienceInitializers": true, + "hasMissingDesignatedInitializers": true, "superclassNames": [ "ObjectiveC.NSObject" ], From 1b852ec34c2da554b64275b4bcbd91a03a7608f4 Mon Sep 17 00:00:00 2001 From: Noah Martin Date: Sun, 2 Nov 2025 08:28:24 -0500 Subject: [PATCH 2/2] Undo rename --- Sentry.xcodeproj/project.pbxproj | 16 +++++------ Sources/Resources/Sentry.modulemap | 2 +- Sources/Sentry/Public/SentryId.h | 17 +---------- Sources/Sentry/SentryClient.m | 1 - Sources/Sentry/SentryOptions.m | 4 +-- ...ptionsHelper.m => SentryOptionsInternal.m} | 10 +++---- Sources/Sentry/SentrySDKInternal.m | 4 +-- ...tionsHelpers.h => SentryOptionsInternal.h} | 2 +- .../DuplicatedSDKTest-Bridging-Header.h | 6 ++++ Tests/SentryTests/Networking/SentryDsnTests.m | 18 ++++++------ .../SentryTransportInitializerTests.swift | 2 +- .../Protocol/SentrySDKSettingsTests.swift | 4 +-- Tests/SentryTests/SentryClientTests.swift | 4 +-- Tests/SentryTests/SentryOptionsTest.m | 28 +++++++++---------- .../SentryTests/SentryTests-Bridging-Header.h | 2 +- Tests/SentryTests/SentryTests.m | 4 +-- 16 files changed, 57 insertions(+), 67 deletions(-) rename Sources/Sentry/{SentyOptionsHelper.m => SentryOptionsInternal.m} (98%) rename Sources/Sentry/include/HybridPublic/{SentryOptionsHelpers.h => SentryOptionsInternal.h} (89%) diff --git a/Sentry.xcodeproj/project.pbxproj b/Sentry.xcodeproj/project.pbxproj index 9840480fcae..cac62bd3801 100644 --- a/Sentry.xcodeproj/project.pbxproj +++ b/Sentry.xcodeproj/project.pbxproj @@ -358,7 +358,7 @@ 7B26BBFB24C0A66D00A79CCC /* SentrySdkInfoNilTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 7B26BBFA24C0A66D00A79CCC /* SentrySdkInfoNilTests.m */; }; 7B2A70D827D5F080008B0D15 /* SentryANRTrackerV1Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B2A70D727D5F07F008B0D15 /* SentryANRTrackerV1Tests.swift */; }; 7B2A70DF27D60904008B0D15 /* SentryTestThreadWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B2A70DE27D60904008B0D15 /* SentryTestThreadWrapper.swift */; }; - 7B2BB0032966F55900A1E102 /* SentryOptionsHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B2BB0012966F55900A1E102 /* SentryOptionsHelpers.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 7B2BB0032966F55900A1E102 /* SentryOptionsInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B2BB0012966F55900A1E102 /* SentryOptionsInternal.h */; settings = {ATTRIBUTES = (Private, ); }; }; 7B30B68026527C3C006B2752 /* SentryFramesTrackerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B30B67F26527C3C006B2752 /* SentryFramesTrackerTests.swift */; }; 7B31C291277B04A000337126 /* SentryCrashPlatformSpecificDefines.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B31C290277B04A000337126 /* SentryCrashPlatformSpecificDefines.h */; }; 7B3398632459C14000BD9C96 /* SentryEnvelopeRateLimit.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B3398622459C14000BD9C96 /* SentryEnvelopeRateLimit.h */; }; @@ -1131,7 +1131,7 @@ FABE8E172E307A7F0040809A /* Dependencies.swift in Sources */ = {isa = PBXBuildFile; fileRef = FABE8E162E307A7C0040809A /* Dependencies.swift */; }; FAC62B652E15A4100003909D /* SentrySDKThreadTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAC62B642E15A40C0003909D /* SentrySDKThreadTests.swift */; }; FAC735232E25AA81006C5A64 /* SentryProfilingSwiftHelpersTests.m in Sources */ = {isa = PBXBuildFile; fileRef = FAC735222E25AA7A006C5A64 /* SentryProfilingSwiftHelpersTests.m */; }; - FACEED132E3179A10007B4AC /* SentyOptionsHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = FACEED122E3179A10007B4AC /* SentyOptionsHelper.m */; }; + FACEED132E3179A10007B4AC /* SentryOptionsInternal.m in Sources */ = {isa = PBXBuildFile; fileRef = FACEED122E3179A10007B4AC /* SentryOptionsInternal.m */; }; FAE2DAB82E1F317900262307 /* SentryProfilingSwiftHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = FAE2DAB72E1F317900262307 /* SentryProfilingSwiftHelpers.m */; }; FAE2DABA2E1F318900262307 /* SentryProfilingSwiftHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = FAE2DAB92E1F318900262307 /* SentryProfilingSwiftHelpers.h */; }; FAE579842E7CF21800B710F9 /* SentryMigrateSessionInit.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAE5797E2E7CF21300B710F9 /* SentryMigrateSessionInit.swift */; }; @@ -1652,7 +1652,7 @@ 7B26BBFA24C0A66D00A79CCC /* SentrySdkInfoNilTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentrySdkInfoNilTests.m; sourceTree = ""; }; 7B2A70D727D5F07F008B0D15 /* SentryANRTrackerV1Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryANRTrackerV1Tests.swift; sourceTree = ""; }; 7B2A70DE27D60904008B0D15 /* SentryTestThreadWrapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryTestThreadWrapper.swift; sourceTree = ""; }; - 7B2BB0012966F55900A1E102 /* SentryOptionsHelpers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryOptionsHelpers.h; path = include/HybridPublic/SentryOptionsHelpers.h; sourceTree = ""; }; + 7B2BB0012966F55900A1E102 /* SentryOptionsInternal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryOptionsInternal.h; path = include/HybridPublic/SentryOptionsInternal.h; sourceTree = ""; }; 7B30B67F26527C3C006B2752 /* SentryFramesTrackerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryFramesTrackerTests.swift; sourceTree = ""; }; 7B30B68126527C55006B2752 /* TestDisplayLinkWrapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestDisplayLinkWrapper.swift; sourceTree = ""; }; 7B31C290277B04A000337126 /* SentryCrashPlatformSpecificDefines.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SentryCrashPlatformSpecificDefines.h; sourceTree = ""; }; @@ -2513,7 +2513,7 @@ FABE8E162E307A7C0040809A /* Dependencies.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dependencies.swift; sourceTree = ""; }; FAC62B642E15A40C0003909D /* SentrySDKThreadTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentrySDKThreadTests.swift; sourceTree = ""; }; FAC735222E25AA7A006C5A64 /* SentryProfilingSwiftHelpersTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryProfilingSwiftHelpersTests.m; sourceTree = ""; }; - FACEED122E3179A10007B4AC /* SentyOptionsHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentyOptionsHelper.m; sourceTree = ""; }; + FACEED122E3179A10007B4AC /* SentryOptionsInternal.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryOptionsInternal.m; sourceTree = ""; }; FAE2DAB72E1F317900262307 /* SentryProfilingSwiftHelpers.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryProfilingSwiftHelpers.m; sourceTree = ""; }; FAE2DAB92E1F318900262307 /* SentryProfilingSwiftHelpers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryProfilingSwiftHelpers.h; path = Sources/Sentry/include/SentryProfilingSwiftHelpers.h; sourceTree = SOURCE_ROOT; }; FAE5797E2E7CF21300B710F9 /* SentryMigrateSessionInit.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryMigrateSessionInit.swift; sourceTree = ""; }; @@ -3119,11 +3119,11 @@ 7B610D5E2512390E00B0B5D9 /* SentrySDK+Private.h */, FA6555132E30181B009917BC /* SentrySDKInternal.h */, FA6555152E30182B009917BC /* SentrySDKInternal.m */, - FACEED122E3179A10007B4AC /* SentyOptionsHelper.m */, + FACEED122E3179A10007B4AC /* SentryOptionsInternal.m */, 63EED6BC2237923600E02400 /* SentryOptions.h */, 63EED6BD2237923600E02400 /* SentryOptions.m */, 7BDEAA002632A4580001EA25 /* SentryOptions+Private.h */, - 7B2BB0012966F55900A1E102 /* SentryOptionsHelpers.h */, + 7B2BB0012966F55900A1E102 /* SentryOptionsInternal.h */, 7D9B079F23D1E89800C5FC8E /* SentryMeta.h */, 7D082B8023C628780029866B /* SentryMeta.m */, D4ECA3FF2E3CBEDE00C757EA /* SentryDummyPrivateEmptyClass.m */, @@ -5206,7 +5206,7 @@ A8AFFCCF2906C03700967CD7 /* SentryRequest.h in Headers */, D82859442C3E753C009A28AA /* SentrySessionReplaySyncC.h in Headers */, 8459FCBE2BD73E820038E9C9 /* SentryProfilerSerialization.h in Headers */, - 7B2BB0032966F55900A1E102 /* SentryOptionsHelpers.h in Headers */, + 7B2BB0032966F55900A1E102 /* SentryOptionsInternal.h in Headers */, 7BF9EF762722B34700B5BBEF /* SentrySubClassFinder.h in Headers */, 7BC852332458802C005A70F0 /* SentryDataCategoryMapper.h in Headers */, 7BDB03B7251364F800BAE198 /* _SentryDispatchQueueWrapperInternal.h in Headers */, @@ -6079,7 +6079,7 @@ 636085141ED47BE600E8599E /* SentryFileManagerHelper.m in Sources */, 63FE710B20DA4C1000CDBAE8 /* SentryCrashMach.c in Sources */, 63FE707720DA4C1000CDBAE8 /* SentryDictionaryDeepSearch.m in Sources */, - FACEED132E3179A10007B4AC /* SentyOptionsHelper.m in Sources */, + FACEED132E3179A10007B4AC /* SentryOptionsInternal.m in Sources */, FAAB95C02EA163590030A2DB /* SentryScopeObserver.swift in Sources */, D48891D02E98F2E700212823 /* SentryInfoPlistError.swift in Sources */, 8482FA9C2DD7C397000E9283 /* SentryFeedbackAPI.m in Sources */, diff --git a/Sources/Resources/Sentry.modulemap b/Sources/Resources/Sentry.modulemap index ee6bcebf30e..3b958eb485d 100644 --- a/Sources/Resources/Sentry.modulemap +++ b/Sources/Resources/Sentry.modulemap @@ -11,7 +11,7 @@ framework module Sentry { header "SentryAppStartMeasurement.h" header "SentryBreadcrumb+Private.h" header "SentryFormatter.h" - header "SentryOptionsHelpers.h" + header "SentryOptionsInternal.h" header "SentrySwizzle.h" header "SentryUser+Private.h" diff --git a/Sources/Sentry/Public/SentryId.h b/Sources/Sentry/Public/SentryId.h index 5c37acc1ecb..1900621828b 100644 --- a/Sources/Sentry/Public/SentryId.h +++ b/Sources/Sentry/Public/SentryId.h @@ -1,26 +1,11 @@ #import -#if !defined(SWIFT_CLASS_PROPERTY) -# if __has_feature(objc_class_property) -# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ -# else -# define SWIFT_CLASS_PROPERTY(...) -# endif -#endif - -#if !defined(OBJC_DESIGNATED_INITIALIZER) -# if __has_attribute(objc_designated_initializer) -# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) -# else -# define OBJC_DESIGNATED_INITIALIZER -# endif -#endif NS_ASSUME_NONNULL_BEGIN @interface SentryId : NSObject /// A @c SentryId with an empty UUID “00000000000000000000000000000000”. -SWIFT_CLASS_PROPERTY(@property(nonatomic, class, readonly, strong) SentryId *_Nonnull empty;) +@property (nonatomic, class, readonly, strong) SentryId *_Nonnull empty; + (SentryId *_Nonnull)empty __attribute__((warn_unused_result)); /// Returns a 32 lowercase character hexadecimal string description of the @c SentryId, such as diff --git a/Sources/Sentry/SentryClient.m b/Sources/Sentry/SentryClient.m index c0e4c35110d..669bd98732c 100644 --- a/Sources/Sentry/SentryClient.m +++ b/Sources/Sentry/SentryClient.m @@ -80,7 +80,6 @@ - (_Nullable instancetype)initWithOptions:(SentryOptions *)options SentryTransportAdapter *transportAdapter = [[SentryTransportAdapter alloc] initWithTransports:transports options:options]; - SentryDefaultThreadInspector *threadInspector = [[SentryDefaultThreadInspector alloc] initWithOptions:options]; diff --git a/Sources/Sentry/SentryOptions.m b/Sources/Sentry/SentryOptions.m index 4f8f7b19b32..3cc73ae9a27 100644 --- a/Sources/Sentry/SentryOptions.m +++ b/Sources/Sentry/SentryOptions.m @@ -12,7 +12,7 @@ #import "SentryMeta.h" #import "SentryNetworkTrackingIntegration.h" #import "SentryOptions+Private.h" -#import "SentryOptionsHelpers.h" +#import "SentryOptionsInternal.h" #import "SentrySDKInternal.h" #import "SentryScope.h" #import "SentrySessionReplayIntegration.h" @@ -46,7 +46,7 @@ - (void)setBeforeSendLogDynamic:(id)beforeSendLogDynamic + (NSArray *)defaultIntegrations { - NSArray *defaultIntegrationClasses = [SentryOptionsHelpers defaultIntegrationClasses]; + NSArray *defaultIntegrationClasses = [SentryOptionsInternal defaultIntegrationClasses]; NSMutableArray *defaultIntegrationNames = [[NSMutableArray alloc] initWithCapacity:defaultIntegrationClasses.count]; diff --git a/Sources/Sentry/SentyOptionsHelper.m b/Sources/Sentry/SentryOptionsInternal.m similarity index 98% rename from Sources/Sentry/SentyOptionsHelper.m rename to Sources/Sentry/SentryOptionsInternal.m index 4c24faafd4e..c4c398fcc89 100644 --- a/Sources/Sentry/SentyOptionsHelper.m +++ b/Sources/Sentry/SentryOptionsInternal.m @@ -1,3 +1,4 @@ +#import "SentryOptionsInternal.h" #import "SentryANRTrackingIntegration.h" #import "SentryAutoBreadcrumbTrackingIntegration.h" #import "SentryAutoSessionTrackingIntegration.h" @@ -10,7 +11,6 @@ #import "SentryNetworkTrackingIntegration.h" #import "SentryOptions+Private.h" #import "SentryOptions.h" -#import "SentryOptionsHelpers.h" #import "SentrySessionReplayIntegration.h" #import "SentrySwift.h" #import "SentrySwiftAsyncIntegration.h" @@ -30,7 +30,7 @@ # import "SentryMetricKitIntegration.h" #endif // SENTRY_HAS_METRIC_KIT -@implementation SentryOptionsHelpers +@implementation SentryOptionsInternal + (NSArray *)defaultIntegrationClasses { @@ -71,9 +71,9 @@ + (nullable SentryOptions *)initWithDict:(NSDictionary *)options didFailWithError:(NSError *_Nullable *_Nullable)error { SentryOptions *sentryOptions = [[SentryOptions alloc] init]; - if (![SentryOptionsHelpers validateOptions:options - sentryOptions:sentryOptions - didFailWithError:error]) { + if (![SentryOptionsInternal validateOptions:options + sentryOptions:sentryOptions + didFailWithError:error]) { if (error != nil) { SENTRY_LOG_ERROR(@"Failed to initialize SentryOptions: %@", *error); } else { diff --git a/Sources/Sentry/SentrySDKInternal.m b/Sources/Sentry/SentrySDKInternal.m index 787406d5c20..8c0cc794629 100644 --- a/Sources/Sentry/SentrySDKInternal.m +++ b/Sources/Sentry/SentrySDKInternal.m @@ -10,7 +10,7 @@ #import "SentryLogC.h" #import "SentryMeta.h" #import "SentryOptions+Private.h" -#import "SentryOptionsHelpers.h" +#import "SentryOptionsInternal.h" #import "SentryProfilingConditionals.h" #import "SentryReplayApi.h" #import "SentrySamplerDecision.h" @@ -532,7 +532,7 @@ + (void)installIntegrations SentryOptions *options = [SentrySDKInternal.currentHub getClient].options; NSMutableArray *integrationNames = [SentryOptions defaultIntegrations].mutableCopy; - NSArray *defaultIntegrations = SentryOptionsHelpers.defaultIntegrationClasses; + NSArray *defaultIntegrations = SentryOptionsInternal.defaultIntegrationClasses; // Since 8.22.0, we use a precompiled XCFramework for SPM, which can lead to Sentry's // definition getting duplicated in the app with a warning “SentrySDK is defined in both diff --git a/Sources/Sentry/include/HybridPublic/SentryOptionsHelpers.h b/Sources/Sentry/include/HybridPublic/SentryOptionsInternal.h similarity index 89% rename from Sources/Sentry/include/HybridPublic/SentryOptionsHelpers.h rename to Sources/Sentry/include/HybridPublic/SentryOptionsInternal.h index 245eb588f62..205f32074ee 100644 --- a/Sources/Sentry/include/HybridPublic/SentryOptionsHelpers.h +++ b/Sources/Sentry/include/HybridPublic/SentryOptionsInternal.h @@ -4,7 +4,7 @@ NS_ASSUME_NONNULL_BEGIN -@interface SentryOptionsHelpers : NSObject +@interface SentryOptionsInternal : NSObject @property (nonatomic, readonly, class) NSArray *defaultIntegrationClasses; diff --git a/Tests/DuplicatedSDKTest/DuplicatedSDKTest/DuplicatedSDKTest-Bridging-Header.h b/Tests/DuplicatedSDKTest/DuplicatedSDKTest/DuplicatedSDKTest-Bridging-Header.h index dae28c7e5c2..72d0f89ac09 100644 --- a/Tests/DuplicatedSDKTest/DuplicatedSDKTest/DuplicatedSDKTest-Bridging-Header.h +++ b/Tests/DuplicatedSDKTest/DuplicatedSDKTest/DuplicatedSDKTest-Bridging-Header.h @@ -2,6 +2,12 @@ #import // Added to run integration tests, do not attempt this in your app +@interface SentryHubInternal : NSObject + +@property (nonatomic, strong) NSMutableArray> *installedIntegrations; + +@end + @interface SentrySDKInternal : NSObject + (SentryHubInternal *)currentHub; diff --git a/Tests/SentryTests/Networking/SentryDsnTests.m b/Tests/SentryTests/Networking/SentryDsnTests.m index 4436879f1fd..795a5f561de 100644 --- a/Tests/SentryTests/Networking/SentryDsnTests.m +++ b/Tests/SentryTests/Networking/SentryDsnTests.m @@ -1,7 +1,7 @@ #import "SentryDsn.h" #import "SentryError.h" #import "SentryMeta.h" -#import "SentryOptionsHelpers.h" +#import "SentryOptionsInternal.h" #import "SentrySwift.h" #import @@ -14,8 +14,8 @@ @implementation SentryDsnTests - (void)testMissingUsernamePassword { NSError *error = nil; - SentryOptions *options = [SentryOptionsHelpers initWithDict:@{ @"dsn" : @"https://sentry.io" } - didFailWithError:&error]; + SentryOptions *options = [SentryOptionsInternal initWithDict:@{ @"dsn" : @"https://sentry.io" } + didFailWithError:&error]; XCTAssertEqual(kSentryErrorInvalidDsnError, error.code); XCTAssertNil(options); } @@ -23,8 +23,8 @@ - (void)testMissingUsernamePassword - (void)testMissingScheme { NSError *error = nil; - SentryOptions *options = [SentryOptionsHelpers initWithDict:@{ @"dsn" : @"https://sentry.io" } - didFailWithError:&error]; + SentryOptions *options = [SentryOptionsInternal initWithDict:@{ @"dsn" : @"https://sentry.io" } + didFailWithError:&error]; XCTAssertEqual(kSentryErrorInvalidDsnError, error.code); XCTAssertNil(options); } @@ -32,8 +32,8 @@ - (void)testMissingScheme - (void)testMissingHost { NSError *error = nil; - SentryOptions *options = [SentryOptionsHelpers initWithDict:@{ @"dsn" : @"http:///1" } - didFailWithError:&error]; + SentryOptions *options = [SentryOptionsInternal initWithDict:@{ @"dsn" : @"http:///1" } + didFailWithError:&error]; XCTAssertEqual(kSentryErrorInvalidDsnError, error.code); XCTAssertNil(options); } @@ -41,8 +41,8 @@ - (void)testMissingHost - (void)testUnsupportedProtocol { NSError *error = nil; - SentryOptions *options = [SentryOptionsHelpers initWithDict:@{ @"dsn" : @"ftp://sentry.io/1" } - didFailWithError:&error]; + SentryOptions *options = [SentryOptionsInternal initWithDict:@{ @"dsn" : @"ftp://sentry.io/1" } + didFailWithError:&error]; XCTAssertEqual(kSentryErrorInvalidDsnError, error.code); XCTAssertNil(options); } diff --git a/Tests/SentryTests/Networking/SentryTransportInitializerTests.swift b/Tests/SentryTests/Networking/SentryTransportInitializerTests.swift index 3b8863c841d..c44bbbaed6e 100644 --- a/Tests/SentryTests/Networking/SentryTransportInitializerTests.swift +++ b/Tests/SentryTests/Networking/SentryTransportInitializerTests.swift @@ -24,7 +24,7 @@ class SentryTransportInitializerTests: XCTestCase { } func testDefault() throws { - let options = try SentryOptionsHelpers.initWithDict(["dsn": SentryTransportInitializerTests.dsnAsString]) + let options = try SentryOptionsInternal.initWithDict(["dsn": SentryTransportInitializerTests.dsnAsString]) let result = TransportInitializer.initTransports( options, diff --git a/Tests/SentryTests/Protocol/SentrySDKSettingsTests.swift b/Tests/SentryTests/Protocol/SentrySDKSettingsTests.swift index 42f5d186439..e71c5281529 100644 --- a/Tests/SentryTests/Protocol/SentrySDKSettingsTests.swift +++ b/Tests/SentryTests/Protocol/SentrySDKSettingsTests.swift @@ -13,7 +13,7 @@ class SentrySDKSettingsTests: XCTestCase { } func testInitWithOptions_WhenSendDefaultPiiTrue_SetsAutoInferIPToTrue() { - let options = try! SentryOptionsHelpers.initWithDict([ + let options = try! SentryOptionsInternal.initWithDict([ "dsn": "https://username:password@app.getsentry.com/12345", "sendDefaultPii": true ]) @@ -27,7 +27,7 @@ class SentrySDKSettingsTests: XCTestCase { } func testInitWithOptions_WhenSendDefaultPiiFalse_SetsAutoInferIPToFalse() { - let options = try! SentryOptionsHelpers.initWithDict([ + let options = try! SentryOptionsInternal.initWithDict([ "dsn": "https://username:password@app.getsentry.com/12345", "sendDefaultPii": false ]) diff --git a/Tests/SentryTests/SentryClientTests.swift b/Tests/SentryTests/SentryClientTests.swift index a5ffbcdb8ce..7f2b466823f 100644 --- a/Tests/SentryTests/SentryClientTests.swift +++ b/Tests/SentryTests/SentryClientTests.swift @@ -2,7 +2,7 @@ @_spi(Private) import SentryTestUtils import XCTest -extension SentryClient { +extension SentryClientInternal { convenience init(options: Options, fileManager: SentryFileManager) { let transports = TransportInitializer.initTransports(options, dateProvider: SentryDependencyContainer.sharedInstance().dateProvider, sentryFileManager: fileManager, rateLimits: SentryDependencyContainer.sharedInstance().rateLimits) @@ -104,7 +104,7 @@ class SentryClientTests: XCTestCase { func getSut(configureOptions: (Options) -> Void = { _ in }) -> SentryClientInternal { var client: SentryClientInternal! do { - let options = try SentryOptionsHelpers.initWithDict([ + let options = try SentryOptionsInternal.initWithDict([ "dsn": SentryClientTests.dsn ]) options.removeAllIntegrations() diff --git a/Tests/SentryTests/SentryOptionsTest.m b/Tests/SentryTests/SentryOptionsTest.m index 37458ffd8ff..97ff6820ad5 100644 --- a/Tests/SentryTests/SentryOptionsTest.m +++ b/Tests/SentryTests/SentryOptionsTest.m @@ -1,6 +1,6 @@ #import "SentryOptions.h" #import "SentryError.h" -#import "SentryOptionsHelpers.h" +#import "SentryOptionsInternal.h" #import "SentrySDKInternal.h" #import "SentrySpan.h" #import "SentryTests-Swift.h" @@ -15,7 +15,7 @@ @implementation SentryOptionsTest - (void)testEmptyDsn { NSError *error = nil; - SentryOptions *options = [SentryOptionsHelpers initWithDict:@{} didFailWithError:&error]; + SentryOptions *options = [SentryOptionsInternal initWithDict:@{} didFailWithError:&error]; XCTAssertNil(options.parsedDsn); XCTAssertEqual(NO, options.debug); @@ -27,8 +27,8 @@ - (void)testEmptyDsn - (void)testInvalidDsnBoolean { NSError *error = nil; - SentryOptions *options = [SentryOptionsHelpers initWithDict:@{ @"dsn" : @YES } - didFailWithError:&error]; + SentryOptions *options = [SentryOptionsInternal initWithDict:@{ @"dsn" : @YES } + didFailWithError:&error]; [self assertDsnNil:options andError:error]; } @@ -43,16 +43,16 @@ - (void)assertDsnNil:(SentryOptions *)options andError:(NSError *)error - (void)testInvalidDsn { NSError *error = nil; - SentryOptions *options = [SentryOptionsHelpers initWithDict:@{ @"dsn" : @"https://sentry.io" } - didFailWithError:&error]; + SentryOptions *options = [SentryOptionsInternal initWithDict:@{ @"dsn" : @"https://sentry.io" } + didFailWithError:&error]; XCTAssertEqual(kSentryErrorInvalidDsnError, error.code); XCTAssertNil(options); } - (void)testInvalidDsnWithNoErrorArgument { - SentryOptions *options = [SentryOptionsHelpers initWithDict:@{ @"dsn" : @"https://sentry.io" } - didFailWithError:nil]; + SentryOptions *options = [SentryOptionsInternal initWithDict:@{ @"dsn" : @"https://sentry.io" } + didFailWithError:nil]; XCTAssertNil(options); } @@ -129,11 +129,11 @@ - (void)testInvalidDebug - (void)testDebugWith:(NSObject *)debugValue expected:(BOOL)expectedDebugValue { NSError *error = nil; - SentryOptions *options = [SentryOptionsHelpers initWithDict:@{ + SentryOptions *options = [SentryOptionsInternal initWithDict:@{ @"dsn" : @"https://username:password@sentry.io/1", @"debug" : debugValue } - didFailWithError:&error]; + didFailWithError:&error]; XCTAssertNil(error); XCTAssertEqual(expectedDebugValue, options.debug); @@ -603,7 +603,7 @@ - (void)testEmptyConstructorSetsDefaultValues - (void)testNSNull_SetsDefaultValue { - SentryOptions *options = [SentryOptionsHelpers initWithDict:@{ + SentryOptions *options = [SentryOptionsInternal initWithDict:@{ @"urlSession" : [NSNull null], @"dsn" : [NSNull null], @"enabled" : [NSNull null], @@ -660,7 +660,7 @@ - (void)testNSNull_SetsDefaultValue @"swiftAsyncStacktraces" : [NSNull null], @"spotlightUrl" : [NSNull null] } - didFailWithError:nil]; + didFailWithError:nil]; XCTAssertNil(options.parsedDsn); [self assertDefaultValues:options]; @@ -1153,8 +1153,8 @@ - (SentryOptions *)getValidOptions:(NSDictionary *)dict [options addEntriesFromDictionary:dict]; - SentryOptions *sentryOptions = [SentryOptionsHelpers initWithDict:options - didFailWithError:&error]; + SentryOptions *sentryOptions = [SentryOptionsInternal initWithDict:options + didFailWithError:&error]; XCTAssertNil(error); return sentryOptions; } diff --git a/Tests/SentryTests/SentryTests-Bridging-Header.h b/Tests/SentryTests/SentryTests-Bridging-Header.h index c69c7ae5026..acb855e6d4c 100644 --- a/Tests/SentryTests/SentryTests-Bridging-Header.h +++ b/Tests/SentryTests/SentryTests-Bridging-Header.h @@ -137,7 +137,7 @@ #import "SentryNetworkTrackingIntegration.h" #import "SentryNoOpSpan.h" #import "SentryOptions+Private.h" -#import "SentryOptionsHelpers.h" +#import "SentryOptionsInternal.h" #import "SentryPerformanceTracker+Testing.h" #import "SentryPerformanceTracker.h" #import "SentryPerformanceTrackingIntegration.h" diff --git a/Tests/SentryTests/SentryTests.m b/Tests/SentryTests/SentryTests.m index 6ba8ff45996..e8bc61904a9 100644 --- a/Tests/SentryTests/SentryTests.m +++ b/Tests/SentryTests/SentryTests.m @@ -8,7 +8,7 @@ #import "SentryLevelMapper.h" #import "SentryMessage.h" #import "SentryMeta.h" -#import "SentryOptionsHelpers.h" +#import "SentryOptionsInternal.h" #import "SentrySDK+Private.h" #import #import @@ -34,7 +34,7 @@ - (void)setUp - (void)testSharedClient { NSError *error = nil; - SentryOptions *options = [SentryOptionsHelpers + SentryOptions *options = [SentryOptionsInternal initWithDict:@{ @"dsn" : @"https://username:password@app.getsentry.com/12345" } didFailWithError:&error];