diff --git a/Sentry.xcodeproj/project.pbxproj b/Sentry.xcodeproj/project.pbxproj index 1bf4c3953fb..472fa38c180 100644 --- a/Sentry.xcodeproj/project.pbxproj +++ b/Sentry.xcodeproj/project.pbxproj @@ -58,7 +58,6 @@ 15E0A8ED240F2CB000F044E3 /* SentrySerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 15E0A8EC240F2CB000F044E3 /* SentrySerialization.m */; }; 15E0A8F0240F638200F044E3 /* SentrySerializationNilTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 15E0A8EF240F638200F044E3 /* SentrySerializationNilTests.m */; }; 15E0A8F22411A45A00F044E3 /* SentrySessionInternal.m in Sources */ = {isa = PBXBuildFile; fileRef = 15E0A8F12411A45A00F044E3 /* SentrySessionInternal.m */; }; - 33042A0D29DAF79A00C60085 /* SentryExtraContextProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 33042A0C29DAF79A00C60085 /* SentryExtraContextProvider.m */; }; 33042A1729DC2C4300C60085 /* SentryExtraContextProviderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33042A1629DC2C4300C60085 /* SentryExtraContextProviderTests.swift */; }; 33EB2A912C3412E4004FED3D /* SentryWithoutUIKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 33EB2A8F2C3411AE004FED3D /* SentryWithoutUIKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; 33EB2A922C341300004FED3D /* Sentry.h in Headers */ = {isa = PBXBuildFile; fileRef = 63AA76931EB9C1C200D153DE /* Sentry.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -1113,6 +1112,8 @@ FAAB2F972E4D345800FE8B7E /* SentryUIDeviceWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAAB2F962E4D344F00FE8B7E /* SentryUIDeviceWrapper.swift */; }; FAAB30F32E4E8F2C00FE8B7E /* SentryInAppLogic.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAAB30F22E4E8F2C00FE8B7E /* SentryInAppLogic.swift */; }; FAAB95C02EA163590030A2DB /* SentryScopeObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAAB95BF2EA163590030A2DB /* SentryScopeObserver.swift */; }; + FAAB95D82EA1E23F0030A2DB /* SentryExtraContextProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAAB95D22EA1E23A0030A2DB /* SentryExtraContextProvider.swift */; }; + FAAB95DE2EA1EB470030A2DB /* SentryDeviceContextKeys.h in Headers */ = {isa = PBXBuildFile; fileRef = FAAB95DD2EA1EB470030A2DB /* SentryDeviceContextKeys.h */; }; FAB007362E9EF8D3001C806A /* SentryUIViewControllerPerformanceTracker.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAB007302E9EF8CB001C806A /* SentryUIViewControllerPerformanceTracker.swift */; }; FAB007432E9F47E8001C806A /* SessionTracker.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAB007422E9F47E4001C806A /* SessionTracker.swift */; }; FAB007522E9FE2FF001C806A /* SentrySwizzleWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAB0074C2E9FE2FA001C806A /* SentrySwizzleWrapper.swift */; }; @@ -1314,8 +1315,6 @@ 15E0A8EC240F2CB000F044E3 /* SentrySerialization.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SentrySerialization.m; sourceTree = ""; }; 15E0A8EF240F638200F044E3 /* SentrySerializationNilTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentrySerializationNilTests.m; sourceTree = ""; }; 15E0A8F12411A45A00F044E3 /* SentrySessionInternal.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SentrySessionInternal.m; sourceTree = ""; }; - 33042A0B29DAF5F400C60085 /* SentryExtraContextProvider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SentryExtraContextProvider.h; sourceTree = ""; }; - 33042A0C29DAF79A00C60085 /* SentryExtraContextProvider.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryExtraContextProvider.m; sourceTree = ""; }; 33042A1629DC2C4300C60085 /* SentryExtraContextProviderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryExtraContextProviderTests.swift; sourceTree = ""; }; 33EB2A8F2C3411AE004FED3D /* SentryWithoutUIKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryWithoutUIKit.h; path = Public/SentryWithoutUIKit.h; sourceTree = ""; }; 51B15F7F2BE88D510026A2F2 /* URLSessionTaskHelperTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLSessionTaskHelperTests.swift; sourceTree = ""; }; @@ -2478,6 +2477,8 @@ FAAB2F962E4D344F00FE8B7E /* SentryUIDeviceWrapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryUIDeviceWrapper.swift; sourceTree = ""; }; FAAB30F22E4E8F2C00FE8B7E /* SentryInAppLogic.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryInAppLogic.swift; sourceTree = ""; }; FAAB95BF2EA163590030A2DB /* SentryScopeObserver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryScopeObserver.swift; sourceTree = ""; }; + FAAB95D22EA1E23A0030A2DB /* SentryExtraContextProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryExtraContextProvider.swift; sourceTree = ""; }; + FAAB95DD2EA1EB470030A2DB /* SentryDeviceContextKeys.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryDeviceContextKeys.h; path = include/SentryDeviceContextKeys.h; sourceTree = ""; }; FAB007302E9EF8CB001C806A /* SentryUIViewControllerPerformanceTracker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryUIViewControllerPerformanceTracker.swift; sourceTree = ""; }; FAB007422E9F47E4001C806A /* SessionTracker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SessionTracker.swift; sourceTree = ""; }; FAB0074C2E9FE2FA001C806A /* SentrySwizzleWrapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentrySwizzleWrapper.swift; sourceTree = ""; }; @@ -2641,6 +2642,7 @@ 621D9F2D2B9B030E003D94DE /* Helper */ = { isa = PBXGroup; children = ( + FAAB95D22EA1E23A0030A2DB /* SentryExtraContextProvider.swift */, FAB0074C2E9FE2FA001C806A /* SentrySwizzleWrapper.swift */, D4F56C3C2E9CEFFB00D57DAB /* InfoPlist */, F4E1E9802E8C2B150007B080 /* SentryDateUtil.swift */, @@ -2971,8 +2973,6 @@ 844EDC75294144DB00C86F34 /* SentrySystemWrapper.mm */, FAB359972E05D7E90083D5E3 /* SentryEventSwiftHelper.h */, FAB359992E05D8080083D5E3 /* SentryEventSwiftHelper.m */, - 33042A0B29DAF5F400C60085 /* SentryExtraContextProvider.h */, - 33042A0C29DAF79A00C60085 /* SentryExtraContextProvider.m */, D8739D152BEEA33F007D2F66 /* SentryLevelHelper.h */, D8739D162BEEA33F007D2F66 /* SentryLevelHelper.m */, F452438B2DE65BC0003E8F50 /* SentryUseNSExceptionCallstackWrapper.h */, @@ -3671,6 +3671,7 @@ 7BE0DC35272AE7BF004FA8B7 /* SentryCrash */ = { isa = PBXGroup; children = ( + FAAB95DD2EA1EB470030A2DB /* SentryDeviceContextKeys.h */, 7DC831082398283C0043DD9A /* SentryCrashIntegration.h */, 7DC831092398283C0043DD9A /* SentryCrashIntegration.m */, 7BCFBD6C2681D0A900BC27D8 /* SentryCrashScopeObserver.h */, @@ -5103,6 +5104,7 @@ F49D419C2DEA30C300D9244E /* SentryCrashExceptionApplicationHelper.h in Headers */, 7BDEAA022632A4580001EA25 /* SentryOptions+Private.h in Headers */, A8AFFCCD29069C3E00967CD7 /* SentryHttpStatusCodeRange.h in Headers */, + FAAB95DE2EA1EB470030A2DB /* SentryDeviceContextKeys.h in Headers */, D83D079B2B7F9D1C00CC9674 /* SentryMsgPackSerializer.h in Headers */, D84F833D2A1CC401005828E0 /* SentrySwiftAsyncIntegration.h in Headers */, 15E0A8EA240F2C9000F044E3 /* SentrySerialization.h in Headers */, @@ -5783,7 +5785,6 @@ 62C1AFAB2B7E10EA0038C5F7 /* SentrySpotlightTransport.m in Sources */, 7B5CAF7727F5A68C00ED0DB6 /* SentryNSURLRequestBuilder.m in Sources */, 639FCFA11EBC804600778193 /* SentryException.m in Sources */, - 33042A0D29DAF79A00C60085 /* SentryExtraContextProvider.m in Sources */, 7BA61CAD247BAA0B00C130A8 /* SentryDebugImageProvider.m in Sources */, 63FE70E720DA4C1000CDBAE8 /* SentryCrashMonitor.c in Sources */, 84354E1229BF944900CDBB8B /* SentryProfileTimeseries.m in Sources */, @@ -5889,6 +5890,7 @@ FA67DD0F2DDBD4EA00896B02 /* SentryViewControllerBreadcrumbTracking.swift in Sources */, FA67DD102DDBD4EA00896B02 /* StringExtensions.swift in Sources */, FA67DD112DDBD4EA00896B02 /* SentryANRType.swift in Sources */, + FAAB95D82EA1E23F0030A2DB /* SentryExtraContextProvider.swift in Sources */, FA67DD122DDBD4EA00896B02 /* Locks.swift in Sources */, 62CB19252E77F8FD00AF5DA2 /* SentryDispatchSourceWrapper.swift in Sources */, FA21F0B42E4A2A80008B4E5A /* SentryAppState.swift in Sources */, diff --git a/Sources/Sentry/PrivateSentrySDKOnly.m b/Sources/Sentry/PrivateSentrySDKOnly.m index e540b3ba1aa..0c5b0150a01 100644 --- a/Sources/Sentry/PrivateSentrySDKOnly.m +++ b/Sources/Sentry/PrivateSentrySDKOnly.m @@ -4,7 +4,6 @@ #import "SentryClient.h" #import "SentryDebugImageProvider+HybridSDKs.h" #import "SentryDebugImageProvider.h" -#import "SentryExtraContextProvider.h" #import "SentryHub+Private.h" #import "SentryInstallation.h" #import "SentryInternalDefines.h" diff --git a/Sources/Sentry/SentryClient.m b/Sources/Sentry/SentryClient.m index c127268fcb3..9bdcc24f124 100644 --- a/Sources/Sentry/SentryClient.m +++ b/Sources/Sentry/SentryClient.m @@ -8,10 +8,10 @@ #import "SentryDebugImageProvider+HybridSDKs.h" #import "SentryDefaultThreadInspector.h" #import "SentryDependencyContainer.h" +#import "SentryDeviceContextKeys.h" #import "SentryDsn.h" #import "SentryEvent+Private.h" #import "SentryException.h" -#import "SentryExtraContextProvider.h" #import "SentryHub+Private.h" #import "SentryHub.h" #import "SentryInstallation.h" diff --git a/Sources/Sentry/SentryDependencyContainer.m b/Sources/Sentry/SentryDependencyContainer.m index f4954b078b3..c3ff879c7a9 100644 --- a/Sources/Sentry/SentryDependencyContainer.m +++ b/Sources/Sentry/SentryDependencyContainer.m @@ -1,7 +1,6 @@ #import "SentryANRTrackerV1.h" #import "SentryDefaultThreadInspector.h" -#import "SentryExtraContextProvider.h" #import "SentryInternalCDefines.h" #import "SentryInternalDefines.h" #import "SentryLogC.h" diff --git a/Sources/Sentry/SentryExtraContextProvider.h b/Sources/Sentry/SentryExtraContextProvider.h deleted file mode 100644 index 086760056c9..00000000000 --- a/Sources/Sentry/SentryExtraContextProvider.h +++ /dev/null @@ -1,30 +0,0 @@ -#if __has_include() -# import -#else -# import "SentryDefines.h" -#endif - -@class SentryCrashWrapper; -@protocol SentryUIDeviceWrapper; -@protocol SentryProcessInfoSource; - -NS_ASSUME_NONNULL_BEGIN - -/** - * Provider of dynamic context data that we need to read at the time of an exception. - */ -@interface SentryExtraContextProvider : NSObject -SENTRY_NO_INIT - -- (instancetype)initWithCrashWrapper:(SentryCrashWrapper *)crashWrapper - processInfoWrapper:(id)processInfoWrapper -#if TARGET_OS_IOS && SENTRY_HAS_UIKIT - deviceWrapper:(id)deviceWrapper -#endif // TARGET_OS_IOS && SENTRY_HAS_UIKIT - ; - -- (NSDictionary *)getExtraContext; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Sources/Sentry/SentryExtraContextProvider.m b/Sources/Sentry/SentryExtraContextProvider.m deleted file mode 100644 index 7ab3250455a..00000000000 --- a/Sources/Sentry/SentryExtraContextProvider.m +++ /dev/null @@ -1,92 +0,0 @@ -#import "SentryExtraContextProvider.h" -#import "SentryCrashIntegration.h" -#import "SentryLogC.h" -#import "SentrySwift.h" - -NSString *const kSentryProcessInfoThermalStateNominal = @"nominal"; -NSString *const kSentryProcessInfoThermalStateFair = @"fair"; -NSString *const kSentryProcessInfoThermalStateSerious = @"serious"; -NSString *const kSentryProcessInfoThermalStateCritical = @"critical"; - -@interface SentryExtraContextProvider () - -@property (nonatomic, strong) SentryCrashWrapper *crashWrapper; -@property (nonatomic, strong) id processInfoWrapper; - -#if TARGET_OS_IOS && SENTRY_HAS_UIKIT -@property (nonatomic, strong) id deviceWrapper; -#endif // TARGET_OS_IOS && SENTRY_HAS_UIKIT - -@end - -@implementation SentryExtraContextProvider - -- (instancetype)initWithCrashWrapper:(id)crashWrapper - processInfoWrapper:(id)processInfoWrapper -#if TARGET_OS_IOS && SENTRY_HAS_UIKIT - deviceWrapper:(id)deviceWrapper -#endif // TARGET_OS_IOS && SENTRY_HAS_UIKIT -{ - if (self = [super init]) { - self.crashWrapper = crashWrapper; - self.processInfoWrapper = processInfoWrapper; -#if TARGET_OS_IOS && SENTRY_HAS_UIKIT - self.deviceWrapper = deviceWrapper; -#endif // TARGET_OS_IOS && SENTRY_HAS_UIKIT - } - return self; -} - -- (NSDictionary *)getExtraContext -{ - return @{ @"device" : [self getExtraDeviceContext], @"app" : [self getExtraAppContext] }; -} - -- (NSDictionary *)getExtraDeviceContext -{ - NSMutableDictionary *extraDeviceContext = [[NSMutableDictionary alloc] init]; - - extraDeviceContext[SentryDeviceContextFreeMemoryKey] = @(self.crashWrapper.freeMemorySize); - extraDeviceContext[@"processor_count"] = @([self.processInfoWrapper processorCount]); - - NSProcessInfoThermalState thermalState = [self.processInfoWrapper thermalState]; - switch (thermalState) { - case NSProcessInfoThermalStateNominal: - extraDeviceContext[@"thermal_state"] = kSentryProcessInfoThermalStateNominal; - break; - case NSProcessInfoThermalStateFair: - extraDeviceContext[@"thermal_state"] = kSentryProcessInfoThermalStateFair; - break; - case NSProcessInfoThermalStateSerious: - extraDeviceContext[@"thermal_state"] = kSentryProcessInfoThermalStateSerious; - break; - case NSProcessInfoThermalStateCritical: - extraDeviceContext[@"thermal_state"] = kSentryProcessInfoThermalStateCritical; - break; - default: - SENTRY_LOG_WARN(@"Unexpected thermal state enum value: %ld", (long)thermalState); - break; - } - -#if TARGET_OS_IOS && SENTRY_HAS_UIKIT - if (self.deviceWrapper.orientation != UIDeviceOrientationUnknown) { - extraDeviceContext[@"orientation"] - = UIDeviceOrientationIsPortrait(self.deviceWrapper.orientation) ? @"portrait" - : @"landscape"; - } - - if (self.deviceWrapper.isBatteryMonitoringEnabled) { - extraDeviceContext[@"charging"] - = self.deviceWrapper.batteryState == UIDeviceBatteryStateCharging ? @(YES) : @(NO); - extraDeviceContext[@"battery_level"] = @((int)(self.deviceWrapper.batteryLevel * 100)); - } -#endif // TARGET_OS_IOS && SENTRY_HAS_UIKIT - return extraDeviceContext; -} - -- (NSDictionary *)getExtraAppContext -{ - return @{ SentryDeviceContextAppMemoryKey : @(self.crashWrapper.appMemorySize) }; -} - -@end diff --git a/Sources/Sentry/include/SentryCrashIntegration.h b/Sources/Sentry/include/SentryCrashIntegration.h index 0afbfa90c45..0da16c8c42b 100644 --- a/Sources/Sentry/include/SentryCrashIntegration.h +++ b/Sources/Sentry/include/SentryCrashIntegration.h @@ -5,9 +5,6 @@ NS_ASSUME_NONNULL_BEGIN @class SentryCrashWrapper; @class SentryScope; -static NSString *const SentryDeviceContextFreeMemoryKey = @"free_memory"; -static NSString *const SentryDeviceContextAppMemoryKey = @"app_memory"; - @interface SentryCrashIntegration : SentryBaseIntegration /** diff --git a/Sources/Sentry/include/SentryDeviceContextKeys.h b/Sources/Sentry/include/SentryDeviceContextKeys.h new file mode 100644 index 00000000000..2a4a57d0de3 --- /dev/null +++ b/Sources/Sentry/include/SentryDeviceContextKeys.h @@ -0,0 +1,2 @@ +static NSString *const SentryDeviceContextFreeMemoryKey = @"free_memory"; +static NSString *const SentryDeviceContextAppMemoryKey = @"app_memory"; diff --git a/Sources/Sentry/include/SentryPrivate.h b/Sources/Sentry/include/SentryPrivate.h index 583f46e9a26..1dc42519f73 100644 --- a/Sources/Sentry/include/SentryPrivate.h +++ b/Sources/Sentry/include/SentryPrivate.h @@ -31,6 +31,7 @@ #import "SentryDateUtils.h" #import "SentryDefaultThreadInspector.h" #import "SentryDependencyContainerSwiftHelper.h" +#import "SentryDeviceContextKeys.h" #import "SentryEvent+Serialize.h" #import "SentryFileIOTrackerHelper.h" #import "SentryFileManagerHelper.h" diff --git a/Sources/Swift/Helper/SentryExtraContextProvider.swift b/Sources/Swift/Helper/SentryExtraContextProvider.swift new file mode 100644 index 00000000000..cf5b6e14d98 --- /dev/null +++ b/Sources/Swift/Helper/SentryExtraContextProvider.swift @@ -0,0 +1,72 @@ +@_implementationOnly import _SentryPrivate + +@_spi(Private) @objc public final class SentryExtraContextProvider: NSObject { + + private static let kSentryProcessInfoThermalStateNominal = "nominal" + private static let kSentryProcessInfoThermalStateFair = "fair" + private static let kSentryProcessInfoThermalStateSerious = "serious" + private static let kSentryProcessInfoThermalStateCritical = "critical" + + private let crashWrapper: SentryCrashWrapper + private let processInfoWrapper: SentryProcessInfoSource + + #if (os(iOS) || targetEnvironment(macCatalyst)) && !SENTRY_NO_UIKIT + private let deviceWrapper: SentryUIDeviceWrapper + + @objc public init(crashWrapper: SentryCrashWrapper, processInfoWrapper: SentryProcessInfoSource, deviceWrapper: SentryUIDeviceWrapper) { + self.crashWrapper = crashWrapper + self.processInfoWrapper = processInfoWrapper + self.deviceWrapper = deviceWrapper + } + #else + @objc public init(crashWrapper: SentryCrashWrapper, processInfoWrapper: SentryProcessInfoSource) { + self.crashWrapper = crashWrapper + self.processInfoWrapper = processInfoWrapper + } + #endif + + @objc public func getExtraContext() -> [String: Any] { + [ + "device": getExtraDeviceContext(), + "app": getExtraAppContext() + ] + } + + private func getExtraDeviceContext() -> [String: Any] { + var extraDeviceContext: [String: Any] = [ + SentryDeviceContextFreeMemoryKey: NSNumber(value: crashWrapper.freeMemorySize), + "processor_count": NSNumber(value: processInfoWrapper.processorCount) + ] + + let thermalState = processInfoWrapper.thermalState + switch thermalState { + case .nominal: + extraDeviceContext["thermal_state"] = Self.kSentryProcessInfoThermalStateNominal + case .fair: + extraDeviceContext["thermal_state"] = Self.kSentryProcessInfoThermalStateFair + case .serious: + extraDeviceContext["thermal_state"] = Self.kSentryProcessInfoThermalStateSerious + case .critical: + extraDeviceContext["thermal_state"] = Self.kSentryProcessInfoThermalStateCritical + default: + SentrySDKLog.warning("Unexpected thermal state enum value: \(thermalState)") + } + + #if (os(iOS) || targetEnvironment(macCatalyst)) && !SENTRY_NO_UIKIT + if deviceWrapper.orientation != .unknown { + extraDeviceContext["orientation"] + = deviceWrapper.orientation.isPortrait ? "portrait" : "landscape" + } + + if deviceWrapper.isBatteryMonitoringEnabled { + extraDeviceContext["charging"] = NSNumber(value: deviceWrapper.batteryState == .charging) + extraDeviceContext["battery_level"] = NSNumber(value: Int(deviceWrapper.batteryLevel * 100)) + } + #endif + return extraDeviceContext + } + + private func getExtraAppContext() -> [String: Any] { + [ SentryDeviceContextAppMemoryKey: NSNumber(value: self.crashWrapper.appMemorySize) ] + } +} diff --git a/Tests/SentryTests/Helper/SentryExtraContextProviderTests.swift b/Tests/SentryTests/Helper/SentryExtraContextProviderTests.swift index 972f632a9a0..0e79092633e 100644 --- a/Tests/SentryTests/Helper/SentryExtraContextProviderTests.swift +++ b/Tests/SentryTests/Helper/SentryExtraContextProviderTests.swift @@ -1,3 +1,4 @@ +@_spi(Private) import Sentry @_spi(Private) import SentryTestUtils import XCTest diff --git a/Tests/SentryTests/SentryCrash/TestSentryUIDeviceWrapper.swift b/Tests/SentryTests/SentryCrash/TestSentryUIDeviceWrapper.swift index c80908cfbb1..42ba50b0f76 100644 --- a/Tests/SentryTests/SentryCrash/TestSentryUIDeviceWrapper.swift +++ b/Tests/SentryTests/SentryCrash/TestSentryUIDeviceWrapper.swift @@ -1,4 +1,4 @@ -import Sentry +@_spi(Private) import Sentry #if os(iOS) || targetEnvironment(macCatalyst) class TestSentryUIDeviceWrapper: SentryUIDeviceWrapper { diff --git a/Tests/SentryTests/SentryTests-Bridging-Header.h b/Tests/SentryTests/SentryTests-Bridging-Header.h index 337fbebcc24..cfe09400fa5 100644 --- a/Tests/SentryTests/SentryTests-Bridging-Header.h +++ b/Tests/SentryTests/SentryTests-Bridging-Header.h @@ -110,7 +110,6 @@ #import "SentryEnvelopeAttachmentHeader.h" #import "SentryEnvelopeRateLimit.h" #import "SentryEvent+Private.h" -#import "SentryExtraContextProvider.h" #import "SentryFileIOTrackerHelper.h" #import "SentryFileIOTrackingIntegration.h" #import "SentryFileManager+Test.h"