Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions Sentry.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@
0A9BF4E928A125390068D266 /* TestSentryViewHierarchyProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A9BF4E628A123270068D266 /* TestSentryViewHierarchyProvider.swift */; };
0A9BF4EB28A127120068D266 /* SentryViewHierarchyIntegrationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A9BF4EA28A127120068D266 /* SentryViewHierarchyIntegrationTests.swift */; };
0A9E917128DC7E7000FB4182 /* SentryInternalCDefines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0A9E917028DC7E7000FB4182 /* SentryInternalCDefines.h */; };
0AAE201E28ED9B9400D0CD80 /* SentryReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AAE201D28ED9B9400D0CD80 /* SentryReachability.m */; };
0AAE202128ED9BCC00D0CD80 /* SentryReachability.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AAE202028ED9BCC00D0CD80 /* SentryReachability.h */; };
0ADC33F128D9BE940078D980 /* TestSentryUIDeviceWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0ADC33EF28D9BE690078D980 /* TestSentryUIDeviceWrapper.swift */; };
0AE455AD28F584D2006680E5 /* SentryReachabilityTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AE455AC28F584D2006680E5 /* SentryReachabilityTests.m */; };
15360CCF2432777500112302 /* SentrySessionTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = 15360CCE2432777400112302 /* SentrySessionTracker.m */; };
Expand Down Expand Up @@ -1027,6 +1025,7 @@
F48F75712E5FA630009D4E7D /* SentryBinaryImageCacheCallbacks.m in Sources */ = {isa = PBXBuildFile; fileRef = F48F75702E5FA630009D4E7D /* SentryBinaryImageCacheCallbacks.m */; };
F48F75732E5FA649009D4E7D /* SentryBinaryImageCacheCallbacks.h in Headers */ = {isa = PBXBuildFile; fileRef = F48F75722E5FA649009D4E7D /* SentryBinaryImageCacheCallbacks.h */; };
F48F767C2E60B555009D4E7D /* SentryNSTimerFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = F48F767B2E60B555009D4E7D /* SentryNSTimerFactory.swift */; };
F48F78692E61DE28009D4E7D /* SentryReachability.swift in Sources */ = {isa = PBXBuildFile; fileRef = F48F78682E61DE28009D4E7D /* SentryReachability.swift */; };
F49236EB2E5E4B2F00663673 /* SentryBinaryImageCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = F49236EA2E5E4B2F00663673 /* SentryBinaryImageCache.swift */; };
F49D41982DEA27AF00D9244E /* SentryUseNSExceptionCallstackWrapperTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F49D41972DEA27AF00D9244E /* SentryUseNSExceptionCallstackWrapperTests.swift */; };
F49D419A2DEA2FB000D9244E /* SentryCrashExceptionApplicationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F49D41992DEA2FB000D9244E /* SentryCrashExceptionApplicationTests.swift */; };
Expand Down Expand Up @@ -1286,8 +1285,6 @@
0A9BF4E628A123270068D266 /* TestSentryViewHierarchyProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestSentryViewHierarchyProvider.swift; sourceTree = "<group>"; };
0A9BF4EA28A127120068D266 /* SentryViewHierarchyIntegrationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryViewHierarchyIntegrationTests.swift; sourceTree = "<group>"; };
0A9E917028DC7E7000FB4182 /* SentryInternalCDefines.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryInternalCDefines.h; path = include/SentryInternalCDefines.h; sourceTree = "<group>"; };
0AAE201D28ED9B9400D0CD80 /* SentryReachability.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryReachability.m; sourceTree = "<group>"; };
0AAE202028ED9BCC00D0CD80 /* SentryReachability.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryReachability.h; path = include/SentryReachability.h; sourceTree = "<group>"; };
0ADC33EF28D9BE690078D980 /* TestSentryUIDeviceWrapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestSentryUIDeviceWrapper.swift; sourceTree = "<group>"; };
0AE455AC28F584D2006680E5 /* SentryReachabilityTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryReachabilityTests.m; sourceTree = "<group>"; };
15360CCE2432777400112302 /* SentrySessionTracker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SentrySessionTracker.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2373,6 +2370,7 @@
F48F75702E5FA630009D4E7D /* SentryBinaryImageCacheCallbacks.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryBinaryImageCacheCallbacks.m; sourceTree = "<group>"; };
F48F75722E5FA649009D4E7D /* SentryBinaryImageCacheCallbacks.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryBinaryImageCacheCallbacks.h; path = ../../Sentry/include/SentryBinaryImageCacheCallbacks.h; sourceTree = "<group>"; };
F48F767B2E60B555009D4E7D /* SentryNSTimerFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryNSTimerFactory.swift; sourceTree = "<group>"; };
F48F78682E61DE28009D4E7D /* SentryReachability.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryReachability.swift; sourceTree = "<group>"; };
F49236EA2E5E4B2F00663673 /* SentryBinaryImageCache.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryBinaryImageCache.swift; sourceTree = "<group>"; };
F49D41972DEA27AF00D9244E /* SentryUseNSExceptionCallstackWrapperTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryUseNSExceptionCallstackWrapperTests.swift; sourceTree = "<group>"; };
F49D41992DEA2FB000D9244E /* SentryCrashExceptionApplicationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryCrashExceptionApplicationTests.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2682,8 +2680,6 @@
84AC61D029F7541E009EEF61 /* SentryDispatchSourceWrapper.h */,
84AC61D429F75A98009EEF61 /* SentryDispatchFactory.h */,
84AC61D529F75A98009EEF61 /* SentryDispatchFactory.m */,
0AAE202028ED9BCC00D0CD80 /* SentryReachability.h */,
0AAE201D28ED9B9400D0CD80 /* SentryReachability.m */,
);
name = Networking;
sourceTree = "<group>";
Expand Down Expand Up @@ -4339,6 +4335,7 @@
D800942328F82E8D005D3943 /* Swift */ = {
isa = PBXGroup;
children = (
F48F78672E61DE08009D4E7D /* Networking */,
FABB48B22E59310D0071397E /* Transaction */,
FAAB29F02E3D252000ACD577 /* SentrySession.swift */,
FA67DCF32DDBD4EA00896B02 /* Core */,
Expand Down Expand Up @@ -4749,6 +4746,14 @@
name = "Recovered References";
sourceTree = "<group>";
};
F48F78672E61DE08009D4E7D /* Networking */ = {
isa = PBXGroup;
children = (
F48F78682E61DE28009D4E7D /* SentryReachability.swift */,
);
path = Networking;
sourceTree = "<group>";
};
FA67DCC62DDBD4EA00896B02 /* Extensions */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -4987,7 +4992,6 @@
D8739D172BEEA33F007D2F66 /* SentryLevelHelper.h in Headers */,
8E4A037825F6F52100000D77 /* SentrySampleDecision.h in Headers */,
63FE717920DA4C1100CDBAE8 /* SentryCrashReportStore.h in Headers */,
0AAE202128ED9BCC00D0CD80 /* SentryReachability.h in Headers */,
A839D89824864B80003B7AFD /* SentrySystemEventBreadcrumbs.h in Headers */,
7B14089624878F090035403D /* SentryCrashStackEntryMapper.h in Headers */,
63FE714920DA4C1100CDBAE8 /* SentryCrashStackCursor_Backtrace.h in Headers */,
Expand Down Expand Up @@ -5594,6 +5598,7 @@
7B8713B426415BAA006D6004 /* SentryAppStartTracker.m in Sources */,
7BDB03BB2513652900BAE198 /* _SentryDispatchQueueWrapperInternal.m in Sources */,
FA6FC0A32E0B5ACE00ED2669 /* SentrySdkPackage.swift in Sources */,
F48F78692E61DE28009D4E7D /* SentryReachability.swift in Sources */,
D8739D142BEE5049007D2F66 /* SentryRRWebSpanEvent.swift in Sources */,
FAAB2F972E4D345800FE8B7E /* SentryUIDeviceWrapper.swift in Sources */,
7B6C5EDE264E8DF00010D138 /* SentryFramesTracker.m in Sources */,
Expand Down Expand Up @@ -5748,7 +5753,6 @@
7DB3A687238EA75E00A2D442 /* SentryHttpTransport.m in Sources */,
63FE70D520DA4C1000CDBAE8 /* SentryCrashMonitor_NSException.m in Sources */,
62F70E952D423BCD00634054 /* SentryMechanismCodable.swift in Sources */,
0AAE201E28ED9B9400D0CD80 /* SentryReachability.m in Sources */,
7B0A54282521C22C00A71716 /* SentryFrameRemover.m in Sources */,
6283085F2D50AA8C00EAEF77 /* SentryMessage.swift in Sources */,
7BC63F0A28081288009D9E37 /* SentrySwizzleWrapper.m in Sources */,
Expand Down
1 change: 0 additions & 1 deletion SentryTestUtils/SentryTestUtils-ObjC-BridgingHeader.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
#import "SentryLogC.h"
#import "SentryNetworkTracker.h"
#import "SentryPerformanceTracker+Testing.h"
#import "SentryReachability.h"
#import "SentrySDK+Private.h"
#import "SentrySDKInternal+Tests.h"
#import "SentryScopeSyncC.h"
Expand Down
5 changes: 2 additions & 3 deletions Sources/Sentry/SentryBreadcrumbTracker.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#import "SentryHub.h"
#import "SentryInternalDefines.h"
#import "SentryLogC.h"
#import "SentryReachability.h"
#import "SentryScope.h"
#import "SentrySwift.h"
#import "SentrySwizzle.h"
Expand Down Expand Up @@ -83,7 +82,7 @@ - (void)stop
_delegate = nil;
#if SENTRY_HAS_REACHABILITY
[self stopTrackNetworkConnectivityChanges];
#endif // !TARGET_OS_WATCH
#endif // SENTRY_HAS_REACHABILITY
}

- (void)trackApplicationNotifications
Expand Down Expand Up @@ -163,7 +162,7 @@ - (void)connectivityChanged:(BOOL)connected typeDescription:(nonnull NSString *)
[self.delegate addBreadcrumb:crumb];
}

#endif // !TARGET_OS_WATCH
#endif // SENTRY_HAS_REACHABILITY

- (void)addBreadcrumbWithType:(NSString *)type
withCategory:(NSString *)category
Expand Down
8 changes: 2 additions & 6 deletions Sources/Sentry/SentryDependencyContainer.m
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@
# import <SentryWatchdogTerminationBreadcrumbProcessor.h>
#endif // SENTRY_HAS_UIKIT

#if !TARGET_OS_WATCH
# import "SentryReachability.h"
#endif // !TARGET_OS_WATCH

/**
* Macro for implementing lazy initialization with a double-checked lock. The double-checked lock
* speeds up the dependency retrieval by around 5%, so it's worth having it. Measured with
Expand Down Expand Up @@ -118,7 +114,7 @@ + (void)reset
@synchronized(sentryDependencyContainerInstanceLock) {
#if SENTRY_HAS_REACHABILITY
[instance->_reachability removeAllObservers];
#endif // !TARGET_OS_WATCH
#endif // SENTRY_HAS_REACHABILITY

#if SENTRY_HAS_UIKIT
[instance->_framesTracker stop];
Expand Down Expand Up @@ -188,7 +184,7 @@ - (instancetype)init

#if SENTRY_HAS_REACHABILITY
_reachability = [[SentryReachability alloc] init];
#endif // !SENTRY_HAS_REACHABILITY
#endif // SENTRY_HAS_REACHABILITY

isInitialializingDependencyContainer = NO;
}
Expand Down
10 changes: 3 additions & 7 deletions Sources/Sentry/SentryHttpTransport.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,10 @@
#import "SentrySerialization.h"
#import "SentrySwift.h"

#if !TARGET_OS_WATCH
# import "SentryReachability.h"
#endif // !TARGET_OS_WATCH

@interface SentryHttpTransport ()
#if SENTRY_HAS_REACHABILITY
<SentryReachabilityObserver>
#endif // !TARGET_OS_WATCH
#endif // SENTRY_HAS_REACHABILITY

@property (nonatomic, readonly) NSTimeInterval cachedEnvelopeSendDelay;
@property (nonatomic, strong) SentryFileManager *fileManager;
Expand Down Expand Up @@ -101,7 +97,7 @@ - (id)initWithDsn:(SentryDsn *)dsn

#if SENTRY_HAS_REACHABILITY
[SentryDependencyContainer.sharedInstance.reachability addObserver:self];
#endif // !TARGET_OS_WATCH
#endif // SENTRY_HAS_REACHABILITY
}
return self;
}
Expand All @@ -121,7 +117,7 @@ - (void)dealloc
{
[SentryDependencyContainer.sharedInstance.reachability removeObserver:self];
}
#endif // !TARGET_OS_WATCH
#endif // SENTRY_HAS_REACHABILITY

- (void)sendEnvelope:(SentryEnvelope *)envelope
{
Expand Down
Loading
Loading