Skip to content

Commit 1a5b01e

Browse files
authored
Merge c197ce5 into 2137530
2 parents 2137530 + c197ce5 commit 1a5b01e

17 files changed

+948
-433
lines changed

Sentry.xcodeproj/project.pbxproj

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@
4848
0A9BF4E928A125390068D266 /* TestSentryViewHierarchyProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A9BF4E628A123270068D266 /* TestSentryViewHierarchyProvider.swift */; };
4949
0A9BF4EB28A127120068D266 /* SentryViewHierarchyIntegrationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A9BF4EA28A127120068D266 /* SentryViewHierarchyIntegrationTests.swift */; };
5050
0A9E917128DC7E7000FB4182 /* SentryInternalCDefines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0A9E917028DC7E7000FB4182 /* SentryInternalCDefines.h */; };
51-
0AAE201E28ED9B9400D0CD80 /* SentryReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AAE201D28ED9B9400D0CD80 /* SentryReachability.m */; };
52-
0AAE202128ED9BCC00D0CD80 /* SentryReachability.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AAE202028ED9BCC00D0CD80 /* SentryReachability.h */; };
5351
0ADC33F128D9BE940078D980 /* TestSentryUIDeviceWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0ADC33EF28D9BE690078D980 /* TestSentryUIDeviceWrapper.swift */; };
5452
0AE455AD28F584D2006680E5 /* SentryReachabilityTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AE455AC28F584D2006680E5 /* SentryReachabilityTests.m */; };
5553
15360CCF2432777500112302 /* SentrySessionTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = 15360CCE2432777400112302 /* SentrySessionTracker.m */; };
@@ -1037,6 +1035,7 @@
10371035
F48F75712E5FA630009D4E7D /* SentryBinaryImageCacheCallbacks.m in Sources */ = {isa = PBXBuildFile; fileRef = F48F75702E5FA630009D4E7D /* SentryBinaryImageCacheCallbacks.m */; };
10381036
F48F75732E5FA649009D4E7D /* SentryBinaryImageCacheCallbacks.h in Headers */ = {isa = PBXBuildFile; fileRef = F48F75722E5FA649009D4E7D /* SentryBinaryImageCacheCallbacks.h */; };
10391037
F48F767C2E60B555009D4E7D /* SentryNSTimerFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = F48F767B2E60B555009D4E7D /* SentryNSTimerFactory.swift */; };
1038+
F48F78692E61DE28009D4E7D /* SentryReachability.swift in Sources */ = {isa = PBXBuildFile; fileRef = F48F78682E61DE28009D4E7D /* SentryReachability.swift */; };
10401039
F49236EB2E5E4B2F00663673 /* SentryBinaryImageCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = F49236EA2E5E4B2F00663673 /* SentryBinaryImageCache.swift */; };
10411040
F49D41982DEA27AF00D9244E /* SentryUseNSExceptionCallstackWrapperTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F49D41972DEA27AF00D9244E /* SentryUseNSExceptionCallstackWrapperTests.swift */; };
10421041
F49D419A2DEA2FB000D9244E /* SentryCrashExceptionApplicationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F49D41992DEA2FB000D9244E /* SentryCrashExceptionApplicationTests.swift */; };
@@ -1282,8 +1281,6 @@
12821281
0A9BF4E628A123270068D266 /* TestSentryViewHierarchyProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestSentryViewHierarchyProvider.swift; sourceTree = "<group>"; };
12831282
0A9BF4EA28A127120068D266 /* SentryViewHierarchyIntegrationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryViewHierarchyIntegrationTests.swift; sourceTree = "<group>"; };
12841283
0A9E917028DC7E7000FB4182 /* SentryInternalCDefines.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryInternalCDefines.h; path = include/SentryInternalCDefines.h; sourceTree = "<group>"; };
1285-
0AAE201D28ED9B9400D0CD80 /* SentryReachability.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryReachability.m; sourceTree = "<group>"; };
1286-
0AAE202028ED9BCC00D0CD80 /* SentryReachability.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryReachability.h; path = include/SentryReachability.h; sourceTree = "<group>"; };
12871284
0ADC33EF28D9BE690078D980 /* TestSentryUIDeviceWrapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestSentryUIDeviceWrapper.swift; sourceTree = "<group>"; };
12881285
0AE455AC28F584D2006680E5 /* SentryReachabilityTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryReachabilityTests.m; sourceTree = "<group>"; };
12891286
15360CCE2432777400112302 /* SentrySessionTracker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SentrySessionTracker.m; sourceTree = "<group>"; };
@@ -2381,6 +2378,7 @@
23812378
F48F75702E5FA630009D4E7D /* SentryBinaryImageCacheCallbacks.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryBinaryImageCacheCallbacks.m; sourceTree = "<group>"; };
23822379
F48F75722E5FA649009D4E7D /* SentryBinaryImageCacheCallbacks.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryBinaryImageCacheCallbacks.h; path = ../../Sentry/include/SentryBinaryImageCacheCallbacks.h; sourceTree = "<group>"; };
23832380
F48F767B2E60B555009D4E7D /* SentryNSTimerFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryNSTimerFactory.swift; sourceTree = "<group>"; };
2381+
F48F78682E61DE28009D4E7D /* SentryReachability.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryReachability.swift; sourceTree = "<group>"; };
23842382
F49236EA2E5E4B2F00663673 /* SentryBinaryImageCache.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryBinaryImageCache.swift; sourceTree = "<group>"; };
23852383
F49D41972DEA27AF00D9244E /* SentryUseNSExceptionCallstackWrapperTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryUseNSExceptionCallstackWrapperTests.swift; sourceTree = "<group>"; };
23862384
F49D41992DEA2FB000D9244E /* SentryCrashExceptionApplicationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryCrashExceptionApplicationTests.swift; sourceTree = "<group>"; };
@@ -2668,8 +2666,6 @@
26682666
84AC61D029F7541E009EEF61 /* SentryDispatchSourceWrapper.h */,
26692667
84AC61D429F75A98009EEF61 /* SentryDispatchFactory.h */,
26702668
84AC61D529F75A98009EEF61 /* SentryDispatchFactory.m */,
2671-
0AAE202028ED9BCC00D0CD80 /* SentryReachability.h */,
2672-
0AAE201D28ED9B9400D0CD80 /* SentryReachability.m */,
26732669
);
26742670
name = Networking;
26752671
sourceTree = "<group>";
@@ -4330,6 +4326,7 @@
43304326
D800942328F82E8D005D3943 /* Swift */ = {
43314327
isa = PBXGroup;
43324328
children = (
4329+
F48F78672E61DE08009D4E7D /* Networking */,
43334330
FABB48B22E59310D0071397E /* Transaction */,
43344331
FA67DCF32DDBD4EA00896B02 /* Core */,
43354332
D8CAC02D2BA0663E00E38F34 /* Integrations */,
@@ -4734,6 +4731,14 @@
47344731
name = "Recovered References";
47354732
sourceTree = "<group>";
47364733
};
4734+
F48F78672E61DE08009D4E7D /* Networking */ = {
4735+
isa = PBXGroup;
4736+
children = (
4737+
F48F78682E61DE28009D4E7D /* SentryReachability.swift */,
4738+
);
4739+
path = Networking;
4740+
sourceTree = "<group>";
4741+
};
47374742
FA67DCC62DDBD4EA00896B02 /* Extensions */ = {
47384743
isa = PBXGroup;
47394744
children = (
@@ -4974,7 +4979,6 @@
49744979
D8739D172BEEA33F007D2F66 /* SentryLevelHelper.h in Headers */,
49754980
8E4A037825F6F52100000D77 /* SentrySampleDecision.h in Headers */,
49764981
63FE717920DA4C1100CDBAE8 /* SentryCrashReportStore.h in Headers */,
4977-
0AAE202128ED9BCC00D0CD80 /* SentryReachability.h in Headers */,
49784982
A839D89824864B80003B7AFD /* SentrySystemEventBreadcrumbs.h in Headers */,
49794983
7B14089624878F090035403D /* SentryCrashStackEntryMapper.h in Headers */,
49804984
63FE714920DA4C1100CDBAE8 /* SentryCrashStackCursor_Backtrace.h in Headers */,
@@ -5587,6 +5591,7 @@
55875591
7B8713B426415BAA006D6004 /* SentryAppStartTracker.m in Sources */,
55885592
7BDB03BB2513652900BAE198 /* _SentryDispatchQueueWrapperInternal.m in Sources */,
55895593
FA6FC0A32E0B5ACE00ED2669 /* SentrySdkPackage.swift in Sources */,
5594+
F48F78692E61DE28009D4E7D /* SentryReachability.swift in Sources */,
55905595
D8739D142BEE5049007D2F66 /* SentryRRWebSpanEvent.swift in Sources */,
55915596
FAAB2F972E4D345800FE8B7E /* SentryUIDeviceWrapper.swift in Sources */,
55925597
7B6C5EDE264E8DF00010D138 /* SentryFramesTracker.m in Sources */,
@@ -5740,7 +5745,6 @@
57405745
7DB3A687238EA75E00A2D442 /* SentryHttpTransport.m in Sources */,
57415746
63FE70D520DA4C1000CDBAE8 /* SentryCrashMonitor_NSException.m in Sources */,
57425747
62F70E952D423BCD00634054 /* SentryMechanismCodable.swift in Sources */,
5743-
0AAE201E28ED9B9400D0CD80 /* SentryReachability.m in Sources */,
57445748
7B0A54282521C22C00A71716 /* SentryFrameRemover.m in Sources */,
57455749
6283085F2D50AA8C00EAEF77 /* SentryMessage.swift in Sources */,
57465750
7BC63F0A28081288009D9E37 /* SentrySwizzleWrapper.m in Sources */,

SentryTestUtils/SentryTestUtils-ObjC-BridgingHeader.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
#import "SentryNSProcessInfoWrapper.h"
4646
#import "SentryNetworkTracker.h"
4747
#import "SentryPerformanceTracker+Testing.h"
48-
#import "SentryReachability.h"
4948
#import "SentrySDK+Private.h"
5049
#import "SentrySDKInternal+Tests.h"
5150
#import "SentryScopeSyncC.h"

Sources/Sentry/SentryBreadcrumbTracker.m

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#import "SentryHub.h"
88
#import "SentryInternalDefines.h"
99
#import "SentryLogC.h"
10-
#import "SentryReachability.h"
1110
#import "SentryScope.h"
1211
#import "SentrySwift.h"
1312
#import "SentrySwizzle.h"
@@ -83,7 +82,7 @@ - (void)stop
8382
_delegate = nil;
8483
#if SENTRY_HAS_REACHABILITY
8584
[self stopTrackNetworkConnectivityChanges];
86-
#endif // !TARGET_OS_WATCH
85+
#endif // SENTRY_HAS_REACHABILITY
8786
}
8887

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

166-
#endif // !TARGET_OS_WATCH
165+
#endif // SENTRY_HAS_REACHABILITY
167166

168167
- (void)addBreadcrumbWithType:(NSString *)type
169168
withCategory:(NSString *)category

Sources/Sentry/SentryDependencyContainer.m

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@
4949
# import "SentryNSApplication.h"
5050
#endif
5151

52-
#if !TARGET_OS_WATCH
53-
# import "SentryReachability.h"
54-
#endif // !TARGET_OS_WATCH
55-
5652
/**
5753
* Macro for implementing lazy initialization with a double-checked lock. The double-checked lock
5854
* speeds up the dependency retrieval by around 5%, so it's worth having it. Measured with
@@ -126,7 +122,7 @@ + (void)reset
126122
@synchronized(sentryDependencyContainerInstanceLock) {
127123
#if SENTRY_HAS_REACHABILITY
128124
[instance->_reachability removeAllObservers];
129-
#endif // !TARGET_OS_WATCH
125+
#endif // SENTRY_HAS_REACHABILITY
130126

131127
#if SENTRY_HAS_UIKIT
132128
[instance->_framesTracker stop];
@@ -195,7 +191,7 @@ - (instancetype)init
195191

196192
#if SENTRY_HAS_REACHABILITY
197193
_reachability = [[SentryReachability alloc] init];
198-
#endif // !SENTRY_HAS_REACHABILITY
194+
#endif // SENTRY_HAS_REACHABILITY
199195

200196
isInitialializingDependencyContainer = NO;
201197
}

Sources/Sentry/SentryHttpTransport.m

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,10 @@
2020
#import "SentrySerialization.h"
2121
#import "SentrySwift.h"
2222

23-
#if !TARGET_OS_WATCH
24-
# import "SentryReachability.h"
25-
#endif // !TARGET_OS_WATCH
26-
2723
@interface SentryHttpTransport ()
2824
#if SENTRY_HAS_REACHABILITY
2925
<SentryReachabilityObserver>
30-
#endif // !TARGET_OS_WATCH
26+
#endif // SENTRY_HAS_REACHABILITY
3127

3228
@property (nonatomic, readonly) NSTimeInterval cachedEnvelopeSendDelay;
3329
@property (nonatomic, strong) SentryFileManager *fileManager;
@@ -102,7 +98,7 @@ - (id)initWithDsn:(SentryDsn *)dsn
10298

10399
#if SENTRY_HAS_REACHABILITY
104100
[SentryDependencyContainer.sharedInstance.reachability addObserver:self];
105-
#endif // !TARGET_OS_WATCH
101+
#endif // SENTRY_HAS_REACHABILITY
106102
}
107103
return self;
108104
}
@@ -122,7 +118,7 @@ - (void)dealloc
122118
{
123119
[SentryDependencyContainer.sharedInstance.reachability removeObserver:self];
124120
}
125-
#endif // !TARGET_OS_WATCH
121+
#endif // SENTRY_HAS_REACHABILITY
126122

127123
- (void)sendEnvelope:(SentryEnvelope *)envelope
128124
{

0 commit comments

Comments
 (0)