Skip to content

Commit fb615c0

Browse files
authored
Merge adaea94 into ef2c9b3
2 parents ef2c9b3 + adaea94 commit fb615c0

17 files changed

+949
-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 */; };
@@ -1040,6 +1038,7 @@
10401038
F48F75732E5FA649009D4E7D /* SentryBinaryImageCacheCallbacks.h in Headers */ = {isa = PBXBuildFile; fileRef = F48F75722E5FA649009D4E7D /* SentryBinaryImageCacheCallbacks.h */; };
10411039
F49236EB2E5E4B2F00663673 /* SentryBinaryImageCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = F49236EA2E5E4B2F00663673 /* SentryBinaryImageCache.swift */; };
10421040
F48F767C2E60B555009D4E7D /* SentryNSTimerFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = F48F767B2E60B555009D4E7D /* SentryNSTimerFactory.swift */; };
1041+
F48F78692E61DE28009D4E7D /* SentryReachability.swift in Sources */ = {isa = PBXBuildFile; fileRef = F48F78682E61DE28009D4E7D /* SentryReachability.swift */; };
10431042
F49D41982DEA27AF00D9244E /* SentryUseNSExceptionCallstackWrapperTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F49D41972DEA27AF00D9244E /* SentryUseNSExceptionCallstackWrapperTests.swift */; };
10441043
F49D419A2DEA2FB000D9244E /* SentryCrashExceptionApplicationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F49D41992DEA2FB000D9244E /* SentryCrashExceptionApplicationTests.swift */; };
10451044
F49D419C2DEA30C300D9244E /* SentryCrashExceptionApplicationHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = F49D419B2DEA30B800D9244E /* SentryCrashExceptionApplicationHelper.h */; };
@@ -1283,8 +1282,6 @@
12831282
0A9BF4E628A123270068D266 /* TestSentryViewHierarchyProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestSentryViewHierarchyProvider.swift; sourceTree = "<group>"; };
12841283
0A9BF4EA28A127120068D266 /* SentryViewHierarchyIntegrationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryViewHierarchyIntegrationTests.swift; sourceTree = "<group>"; };
12851284
0A9E917028DC7E7000FB4182 /* SentryInternalCDefines.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryInternalCDefines.h; path = include/SentryInternalCDefines.h; sourceTree = "<group>"; };
1286-
0AAE201D28ED9B9400D0CD80 /* SentryReachability.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryReachability.m; sourceTree = "<group>"; };
1287-
0AAE202028ED9BCC00D0CD80 /* SentryReachability.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryReachability.h; path = include/SentryReachability.h; sourceTree = "<group>"; };
12881285
0ADC33EF28D9BE690078D980 /* TestSentryUIDeviceWrapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestSentryUIDeviceWrapper.swift; sourceTree = "<group>"; };
12891286
0AE455AC28F584D2006680E5 /* SentryReachabilityTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryReachabilityTests.m; sourceTree = "<group>"; };
12901287
15360CCE2432777400112302 /* SentrySessionTracker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SentrySessionTracker.m; sourceTree = "<group>"; };
@@ -2385,6 +2382,7 @@
23852382
F48F75722E5FA649009D4E7D /* SentryBinaryImageCacheCallbacks.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryBinaryImageCacheCallbacks.h; path = ../../Sentry/include/SentryBinaryImageCacheCallbacks.h; sourceTree = "<group>"; };
23862383
F49236EA2E5E4B2F00663673 /* SentryBinaryImageCache.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryBinaryImageCache.swift; sourceTree = "<group>"; };
23872384
F48F767B2E60B555009D4E7D /* SentryNSTimerFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryNSTimerFactory.swift; sourceTree = "<group>"; };
2385+
F48F78682E61DE28009D4E7D /* SentryReachability.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryReachability.swift; sourceTree = "<group>"; };
23882386
F49D41972DEA27AF00D9244E /* SentryUseNSExceptionCallstackWrapperTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryUseNSExceptionCallstackWrapperTests.swift; sourceTree = "<group>"; };
23892387
F49D41992DEA2FB000D9244E /* SentryCrashExceptionApplicationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryCrashExceptionApplicationTests.swift; sourceTree = "<group>"; };
23902388
F49D419B2DEA30B800D9244E /* SentryCrashExceptionApplicationHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryCrashExceptionApplicationHelper.h; path = include/SentryCrashExceptionApplicationHelper.h; sourceTree = "<group>"; };
@@ -2669,8 +2667,6 @@
26692667
84AC61D029F7541E009EEF61 /* SentryDispatchSourceWrapper.h */,
26702668
84AC61D429F75A98009EEF61 /* SentryDispatchFactory.h */,
26712669
84AC61D529F75A98009EEF61 /* SentryDispatchFactory.m */,
2672-
0AAE202028ED9BCC00D0CD80 /* SentryReachability.h */,
2673-
0AAE201D28ED9B9400D0CD80 /* SentryReachability.m */,
26742670
);
26752671
name = Networking;
26762672
sourceTree = "<group>";
@@ -4333,6 +4329,7 @@
43334329
D800942328F82E8D005D3943 /* Swift */ = {
43344330
isa = PBXGroup;
43354331
children = (
4332+
F48F78672E61DE08009D4E7D /* Networking */,
43364333
FABB48B22E59310D0071397E /* Transaction */,
43374334
FA67DCF32DDBD4EA00896B02 /* Core */,
43384335
D8CAC02D2BA0663E00E38F34 /* Integrations */,
@@ -4737,6 +4734,14 @@
47374734
name = "Recovered References";
47384735
sourceTree = "<group>";
47394736
};
4737+
F48F78672E61DE08009D4E7D /* Networking */ = {
4738+
isa = PBXGroup;
4739+
children = (
4740+
F48F78682E61DE28009D4E7D /* SentryReachability.swift */,
4741+
);
4742+
path = Networking;
4743+
sourceTree = "<group>";
4744+
};
47404745
FA67DCC62DDBD4EA00896B02 /* Extensions */ = {
47414746
isa = PBXGroup;
47424747
children = (
@@ -4977,7 +4982,6 @@
49774982
D8739D172BEEA33F007D2F66 /* SentryLevelHelper.h in Headers */,
49784983
8E4A037825F6F52100000D77 /* SentrySampleDecision.h in Headers */,
49794984
63FE717920DA4C1100CDBAE8 /* SentryCrashReportStore.h in Headers */,
4980-
0AAE202128ED9BCC00D0CD80 /* SentryReachability.h in Headers */,
49814985
A839D89824864B80003B7AFD /* SentrySystemEventBreadcrumbs.h in Headers */,
49824986
7B14089624878F090035403D /* SentryCrashStackEntryMapper.h in Headers */,
49834987
63FE714920DA4C1100CDBAE8 /* SentryCrashStackCursor_Backtrace.h in Headers */,
@@ -5591,6 +5595,7 @@
55915595
7B8713B426415BAA006D6004 /* SentryAppStartTracker.m in Sources */,
55925596
7BDB03BB2513652900BAE198 /* _SentryDispatchQueueWrapperInternal.m in Sources */,
55935597
FA6FC0A32E0B5ACE00ED2669 /* SentrySdkPackage.swift in Sources */,
5598+
F48F78692E61DE28009D4E7D /* SentryReachability.swift in Sources */,
55945599
D8739D142BEE5049007D2F66 /* SentryRRWebSpanEvent.swift in Sources */,
55955600
FAAB2F972E4D345800FE8B7E /* SentryUIDeviceWrapper.swift in Sources */,
55965601
7B6C5EDE264E8DF00010D138 /* SentryFramesTracker.m in Sources */,
@@ -5744,7 +5749,6 @@
57445749
7DB3A687238EA75E00A2D442 /* SentryHttpTransport.m in Sources */,
57455750
63FE70D520DA4C1000CDBAE8 /* SentryCrashMonitor_NSException.m in Sources */,
57465751
62F70E952D423BCD00634054 /* SentryMechanismCodable.swift in Sources */,
5747-
0AAE201E28ED9B9400D0CD80 /* SentryReachability.m in Sources */,
57485752
7B0A54282521C22C00A71716 /* SentryFrameRemover.m in Sources */,
57495753
6283085F2D50AA8C00EAEF77 /* SentryMessage.swift in Sources */,
57505754
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
@@ -50,10 +50,6 @@
5050
# import "SentryNSApplication.h"
5151
#endif
5252

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

132128
#if SENTRY_HAS_UIKIT
133129
[instance->_framesTracker stop];
@@ -196,7 +192,7 @@ - (instancetype)init
196192

197193
#if SENTRY_HAS_REACHABILITY
198194
_reachability = [[SentryReachability alloc] init];
199-
#endif // !SENTRY_HAS_REACHABILITY
195+
#endif // SENTRY_HAS_REACHABILITY
200196

201197
isInitialializingDependencyContainer = NO;
202198
}

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)