Skip to content

Commit 2de284c

Browse files
authored
Chore: Swift Sentry Integration (#3733)
Moved SentryIntegrationProtocol to swift and fixed some headers references in order to be able to write new integrations in Swift. Required for Session Replay
1 parent 1731a1c commit 2de284c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+74
-49
lines changed

Sentry.xcodeproj/project.pbxproj

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,6 @@
604604
7DB3A687238EA75E00A2D442 /* SentryHttpTransport.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DB3A684238EA75E00A2D442 /* SentryHttpTransport.m */; };
605605
7DC27EC523997EB7006998B5 /* SentryAutoBreadcrumbTrackingIntegration.h in Headers */ = {isa = PBXBuildFile; fileRef = 7DC27EC323997EB7006998B5 /* SentryAutoBreadcrumbTrackingIntegration.h */; };
606606
7DC27EC723997EB7006998B5 /* SentryAutoBreadcrumbTrackingIntegration.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DC27EC423997EB7006998B5 /* SentryAutoBreadcrumbTrackingIntegration.m */; };
607-
7DC83100239826280043DD9A /* SentryIntegrationProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 7DC830FF239826280043DD9A /* SentryIntegrationProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
608607
7DC8310A2398283C0043DD9A /* SentryCrashIntegration.h in Headers */ = {isa = PBXBuildFile; fileRef = 7DC831082398283C0043DD9A /* SentryCrashIntegration.h */; };
609608
7DC8310C2398283C0043DD9A /* SentryCrashIntegration.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DC831092398283C0043DD9A /* SentryCrashIntegration.m */; };
610609
840A11122B61E27500650D02 /* SentrySamplerDecision.m in Sources */ = {isa = PBXBuildFile; fileRef = 840A11102B61E27500650D02 /* SentrySamplerDecision.m */; };
@@ -827,6 +826,7 @@
827826
D8C66A372A77B1F70015696A /* SentryPropagationContext.m in Sources */ = {isa = PBXBuildFile; fileRef = D8C66A352A77B1F70015696A /* SentryPropagationContext.m */; };
828827
D8C67E9B28000E24007E326E /* SentryUIApplication.h in Headers */ = {isa = PBXBuildFile; fileRef = D8C67E9928000E23007E326E /* SentryUIApplication.h */; };
829828
D8C67E9C28000E24007E326E /* SentryScreenshot.h in Headers */ = {isa = PBXBuildFile; fileRef = D8C67E9A28000E23007E326E /* SentryScreenshot.h */; };
829+
D8CAC0412BA0984500E38F34 /* SentryIntegrationProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8CAC0402BA0984500E38F34 /* SentryIntegrationProtocol.swift */; };
830830
D8CB74152947246600A5F964 /* SentryEnvelopeAttachmentHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = D8CB74142947246600A5F964 /* SentryEnvelopeAttachmentHeader.h */; };
831831
D8CB7417294724CC00A5F964 /* SentryEnvelopeAttachmentHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = D8CB7416294724CC00A5F964 /* SentryEnvelopeAttachmentHeader.m */; };
832832
D8CB74192947285A00A5F964 /* SentryEnvelopeItemHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = D8CB74182947285A00A5F964 /* SentryEnvelopeItemHeader.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -1550,7 +1550,6 @@
15501550
7DC27E9823995F97006998B5 /* Sentry.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; name = Sentry.modulemap; path = ../Resources/Sentry.modulemap; sourceTree = "<group>"; };
15511551
7DC27EC323997EB7006998B5 /* SentryAutoBreadcrumbTrackingIntegration.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryAutoBreadcrumbTrackingIntegration.h; path = include/SentryAutoBreadcrumbTrackingIntegration.h; sourceTree = "<group>"; };
15521552
7DC27EC423997EB7006998B5 /* SentryAutoBreadcrumbTrackingIntegration.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryAutoBreadcrumbTrackingIntegration.m; sourceTree = "<group>"; };
1553-
7DC830FF239826280043DD9A /* SentryIntegrationProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryIntegrationProtocol.h; path = Public/SentryIntegrationProtocol.h; sourceTree = "<group>"; };
15541553
7DC831082398283C0043DD9A /* SentryCrashIntegration.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryCrashIntegration.h; path = include/SentryCrashIntegration.h; sourceTree = "<group>"; };
15551554
7DC831092398283C0043DD9A /* SentryCrashIntegration.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryCrashIntegration.m; sourceTree = "<group>"; };
15561555
840A11092B5F47F700650D02 /* SentryAppLaunchProfilingTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryAppLaunchProfilingTests.m; sourceTree = "<group>"; };
@@ -1800,6 +1799,7 @@
18001799
D8C66A352A77B1F70015696A /* SentryPropagationContext.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryPropagationContext.m; sourceTree = "<group>"; };
18011800
D8C67E9928000E23007E326E /* SentryUIApplication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentryUIApplication.h; path = include/SentryUIApplication.h; sourceTree = "<group>"; };
18021801
D8C67E9A28000E23007E326E /* SentryScreenshot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentryScreenshot.h; path = include/SentryScreenshot.h; sourceTree = "<group>"; };
1802+
D8CAC0402BA0984500E38F34 /* SentryIntegrationProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryIntegrationProtocol.swift; sourceTree = "<group>"; };
18031803
D8CB74142947246600A5F964 /* SentryEnvelopeAttachmentHeader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryEnvelopeAttachmentHeader.h; path = include/SentryEnvelopeAttachmentHeader.h; sourceTree = "<group>"; };
18041804
D8CB7416294724CC00A5F964 /* SentryEnvelopeAttachmentHeader.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryEnvelopeAttachmentHeader.m; sourceTree = "<group>"; };
18051805
D8CB74182947285A00A5F964 /* SentryEnvelopeItemHeader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryEnvelopeItemHeader.h; path = Public/SentryEnvelopeItemHeader.h; sourceTree = "<group>"; };
@@ -2005,7 +2005,6 @@
20052005
6360850B1ED2AFE100E8599E /* SentryBreadcrumb.h */,
20062006
6360850C1ED2AFE100E8599E /* SentryBreadcrumb.m */,
20072007
92672BB529C9A2A9006B021C /* SentryBreadcrumb+Private.h */,
2008-
7DC830FF239826280043DD9A /* SentryIntegrationProtocol.h */,
20092008
7B4E24FB251C97B400060D68 /* SentrySession.h */,
20102009
15E0A8F12411A45A00F044E3 /* SentrySession.m */,
20112010
7BE1E32624F7AE08009D3AD0 /* SentrySession+Private.h */,
@@ -3519,6 +3518,7 @@
35193518
isa = PBXGroup;
35203519
children = (
35213520
D8F016B22B9622D6007B9AFB /* SentryId.swift */,
3521+
D8CAC0402BA0984500E38F34 /* SentryIntegrationProtocol.swift */,
35223522
);
35233523
path = Protocol;
35243524
sourceTree = "<group>";
@@ -3813,7 +3813,6 @@
38133813
7BC5B6FA290BCDE500D99477 /* SentryHttpStatusCodeRange+Private.h in Headers */,
38143814
7B04A9AF24EAC02C00E710B1 /* SentryRetryAfterHeaderParser.h in Headers */,
38153815
9286059529A5096600F96038 /* SentryGeo.h in Headers */,
3816-
7DC83100239826280043DD9A /* SentryIntegrationProtocol.h in Headers */,
38173816
7B98D7BC25FB607300C5A389 /* SentryWatchdogTerminationTracker.h in Headers */,
38183817
7BA61CB9247BC57B00C130A8 /* SentryCrashDefaultBinaryImageProvider.h in Headers */,
38193818
8E4E7C7D25DAB287006AB9E2 /* SentryTracer.h in Headers */,
@@ -4301,6 +4300,7 @@
43014300
7B14089824878F950035403D /* SentryCrashStackEntryMapper.m in Sources */,
43024301
63FE711720DA4C1000CDBAE8 /* SentryCrashStackCursor_Backtrace.c in Sources */,
43034302
63FE70CB20DA4C1000CDBAE8 /* SentryCrashReportFixer.c in Sources */,
4303+
D8CAC0412BA0984500E38F34 /* SentryIntegrationProtocol.swift in Sources */,
43044304
63FE710F20DA4C1000CDBAE8 /* NSError+SentrySimpleConstructor.m in Sources */,
43054305
8ECC674925C23A20000E2BF6 /* SentrySpanId.m in Sources */,
43064306
6344DDB51EC309E000D9160D /* SentryCrashReportSink.m in Sources */,
@@ -4908,6 +4908,7 @@
49084908
"PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "";
49094909
SWIFT_INCLUDE_PATHS = "";
49104910
SWIFT_OBJC_BRIDGING_HEADER = "Tests/SentryTests/SentryTests-Bridging-Header.h";
4911+
SWIFT_OBJC_INTEROP_MODE = objc;
49114912
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
49124913
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
49134914
SWIFT_VERSION = 5.0;
@@ -4943,6 +4944,7 @@
49434944
"PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "";
49444945
SWIFT_INCLUDE_PATHS = "";
49454946
SWIFT_OBJC_BRIDGING_HEADER = "Tests/SentryTests/SentryTests-Bridging-Header.h";
4947+
SWIFT_OBJC_INTEROP_MODE = objc;
49464948
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
49474949
SWIFT_VERSION = 5.0;
49484950
TVOS_DEPLOYMENT_TARGET = 13.0;
@@ -5085,6 +5087,7 @@
50855087
"PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "";
50865088
SWIFT_INCLUDE_PATHS = "";
50875089
SWIFT_OBJC_BRIDGING_HEADER = "Tests/SentryTests/SentryTests-Bridging-Header.h";
5090+
SWIFT_OBJC_INTEROP_MODE = objc;
50885091
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
50895092
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
50905093
SWIFT_VERSION = 5.0;
@@ -5224,6 +5227,7 @@
52245227
"PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "";
52255228
SWIFT_INCLUDE_PATHS = "";
52265229
SWIFT_OBJC_BRIDGING_HEADER = "Tests/SentryTests/SentryTests-Bridging-Header.h";
5230+
SWIFT_OBJC_INTEROP_MODE = objc;
52275231
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
52285232
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
52295233
SWIFT_VERSION = 5.0;
@@ -5712,6 +5716,7 @@
57125716
"PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "";
57135717
SWIFT_INCLUDE_PATHS = "";
57145718
SWIFT_OBJC_BRIDGING_HEADER = "Tests/SentryTests/SentryTests-Bridging-Header.h";
5719+
SWIFT_OBJC_INTEROP_MODE = objc;
57155720
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
57165721
SWIFT_VERSION = 5.0;
57175722
TVOS_DEPLOYMENT_TARGET = 13.0;
@@ -5952,6 +5957,7 @@
59525957
"PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "";
59535958
SWIFT_INCLUDE_PATHS = "";
59545959
SWIFT_OBJC_BRIDGING_HEADER = "Tests/SentryTests/SentryTests-Bridging-Header.h";
5960+
SWIFT_OBJC_INTEROP_MODE = objc;
59555961
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
59565962
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
59575963
SWIFT_VERSION = 5.0;

Sources/Sentry/PrivateSentrySDKOnly.mm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#import "SentryInstallation.h"
99
#import "SentryInternalDefines.h"
1010
#import "SentryMeta.h"
11+
#import "SentryOptions.h"
1112
#import "SentryProfiledTracerConcurrency.h"
1213
#import "SentryProfiler.h"
1314
#import "SentrySDK+Private.h"

Sources/Sentry/Public/Sentry.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ FOUNDATION_EXPORT const unsigned char SentryVersionString[];
2222
#import "SentryGeo.h"
2323
#import "SentryHttpStatusCodeRange.h"
2424
#import "SentryHub.h"
25-
#import "SentryIntegrationProtocol.h"
2625
#import "SentryMeasurementUnit.h"
2726
#import "SentryMechanism.h"
2827
#import "SentryMechanismMeta.h"

Sources/Sentry/Public/SentryHub.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#import "SentryDefines.h"
2-
#import "SentryIntegrationProtocol.h"
32
#import "SentrySpanProtocol.h"
43

54
@class SentryEvent, SentryClient, SentryScope, SentryUser, SentryBreadcrumb, SentryId,

Sources/Sentry/Public/SentryIntegrationProtocol.h

Lines changed: 0 additions & 23 deletions
This file was deleted.

Sources/Sentry/SentryAppStartTrackingIntegration.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
# import "SentryAppStartTracker.h"
66
# import "SentryLog.h"
7+
# import "SentryOptions.h"
78
# import <Foundation/Foundation.h>
89
# import <PrivateSentrySDKOnly.h>
910
# import <SentryAppStateManager.h>

Sources/Sentry/SentryBaseIntegration.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@ - (SentryIntegrationOption)integrationOptions
165165
return kIntegrationOptionNone;
166166
}
167167

168+
- (void)uninstall
169+
{
170+
}
171+
168172
@end
169173

170174
NS_ASSUME_NONNULL_END

Sources/Sentry/SentryCrashIntegration.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#import "SentryEvent.h"
66
#import "SentryHub.h"
77
#import "SentryInAppLogic.h"
8+
#import "SentryOptions.h"
89
#import "SentrySDK+Private.h"
910
#import "SentryScope+Private.h"
1011
#import "SentrySessionCrashedHandler.h"

Sources/Sentry/SentryHub.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#import "SentryLevelMapper.h"
1212
#import "SentryLog.h"
1313
#import "SentryNSTimerFactory.h"
14+
#import "SentryOptions.h"
1415
#import "SentryPerformanceTracker.h"
1516
#import "SentryProfilingConditionals.h"
1617
#import "SentrySDK+Private.h"

Sources/Sentry/SentryMetricKitIntegration.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#if SENTRY_HAS_METRIC_KIT
44

55
# import "SentryInternalDefines.h"
6+
# import "SentryOptions.h"
67
# import "SentryScope.h"
78
# import <Foundation/Foundation.h>
89
# import <SentryDebugMeta.h>

0 commit comments

Comments
 (0)