Skip to content

Commit ef238a7

Browse files
authored
ref: Convert SentryDsn to Swift (#6942)
1 parent 3acb318 commit ef238a7

22 files changed

+490
-406
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
## Unreleased
44

5+
> [!Warning]
6+
> The class `SentryDsn` has been converted from Objective-C to Swift. While the public API remains the same, you might have to remove imports of the `SentryDsn.h` from your Objective-C code.
7+
> We acknowledge that this is a breaking change introduced in a minor release, but it should have been part of the major release 9.0.0 already before - apologies for any inconveniences caused.
8+
9+
### Breaking Changes
10+
11+
- Refactored type `SentryDsn` from Objective-C to Swift, removing the `SentryDsn.h` from the public header files.
12+
513
### Features
614

715
- Add attributes data to `SentryScope` (#6830)

Samples/iOS-Swift/iOS-Swift/Tools/iOS-Swift-Bridging-Header.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@
22
#import "SentryBenchmarking.h"
33
#import "SentryExposure.h"
44
#import <Sentry/PrivateSentrySDKOnly.h>
5-
#import <Sentry/SentryDsn+Private.h>

Sentry.xcodeproj/project.pbxproj

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,6 @@
200200
63AA76991EB9C1C200D153DE /* SentryDefines.h in Headers */ = {isa = PBXBuildFile; fileRef = 63AA76951EB9C1C200D153DE /* SentryDefines.h */; settings = {ATTRIBUTES = (Public, ); }; };
201201
63AA769D1EB9C57A00D153DE /* SentryError.h in Headers */ = {isa = PBXBuildFile; fileRef = 63AA769B1EB9C57A00D153DE /* SentryError.h */; settings = {ATTRIBUTES = (Public, ); }; };
202202
63AA769E1EB9C57A00D153DE /* SentryError.mm in Sources */ = {isa = PBXBuildFile; fileRef = 63AA769C1EB9C57A00D153DE /* SentryError.mm */; };
203-
63AA76A31EB9CBAA00D153DE /* SentryDsn.m in Sources */ = {isa = PBXBuildFile; fileRef = 63AA76A11EB9CBAA00D153DE /* SentryDsn.m */; };
204-
63AA76A51EB9CBC200D153DE /* SentryDsn.h in Headers */ = {isa = PBXBuildFile; fileRef = 63AA76A41EB9CBC200D153DE /* SentryDsn.h */; settings = {ATTRIBUTES = (Public, ); }; };
205203
63AF656C1ED87B8C00EBCFF7 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 6304360D1EC05CEF00C4D3FA /* libz.tbd */; };
206204
63B818F91EC34639002FDF4C /* SentryDebugMeta.h in Headers */ = {isa = PBXBuildFile; fileRef = 63B818F71EC34639002FDF4C /* SentryDebugMeta.h */; settings = {ATTRIBUTES = (Public, ); }; };
207205
63B818FA1EC34639002FDF4C /* SentryDebugMeta.m in Sources */ = {isa = PBXBuildFile; fileRef = 63B818F81EC34639002FDF4C /* SentryDebugMeta.m */; };
@@ -731,9 +729,9 @@
731729
A8AFFCD42907E0CA00967CD7 /* SentryRequestTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8AFFCD32907E0CA00967CD7 /* SentryRequestTests.swift */; };
732730
A8F17B2E2901765900990B25 /* SentryRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A8F17B2D2901765900990B25 /* SentryRequest.m */; };
733731
A8F17B342902870300990B25 /* SentryHttpStatusCodeRange.m in Sources */ = {isa = PBXBuildFile; fileRef = A8F17B332902870300990B25 /* SentryHttpStatusCodeRange.m */; };
732+
AEA159B02EDDF6AD000D37E2 /* SentryDsn.swift in Sources */ = {isa = PBXBuildFile; fileRef = AEA159AF2EDDF6AD000D37E2 /* SentryDsn.swift */; };
734733
D4009EB22D771BC20007AF30 /* SentryFileIOTrackerSwiftHelpersTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4009EB12D771BB90007AF30 /* SentryFileIOTrackerSwiftHelpersTests.swift */; };
735734
D41415A72DEEE532003B14D5 /* SentryRedactViewHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = D41415A62DEEE532003B14D5 /* SentryRedactViewHelper.swift */; };
736-
D4237B3D2EB39D9700FE027C /* SentryDsn+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = D4237B3C2EB39D9700FE027C /* SentryDsn+Private.h */; settings = {ATTRIBUTES = (Private, ); }; };
737735
D4291A6D2DD62ACE00772088 /* SentryDispatchFactoryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = D4291A6C2DD62AC800772088 /* SentryDispatchFactoryTests.m */; };
738736
D42ADEEF2E9CF43200753166 /* SentrySessionReplayEnvironmentChecker.swift in Sources */ = {isa = PBXBuildFile; fileRef = D42ADEE92E9CF42800753166 /* SentrySessionReplayEnvironmentChecker.swift */; };
739737
D42ADF372E9CF95700753166 /* SentrySessionReplayEnvironmentCheckerProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = D42ADF362E9CF95500753166 /* SentrySessionReplayEnvironmentCheckerProvider.swift */; };
@@ -1490,8 +1488,6 @@
14901488
63AA76951EB9C1C200D153DE /* SentryDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentryDefines.h; path = Public/SentryDefines.h; sourceTree = "<group>"; };
14911489
63AA769B1EB9C57A00D153DE /* SentryError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentryError.h; path = Public/SentryError.h; sourceTree = "<group>"; };
14921490
63AA769C1EB9C57A00D153DE /* SentryError.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SentryError.mm; sourceTree = "<group>"; };
1493-
63AA76A11EB9CBAA00D153DE /* SentryDsn.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SentryDsn.m; sourceTree = "<group>"; };
1494-
63AA76A41EB9CBC200D153DE /* SentryDsn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentryDsn.h; path = Public/SentryDsn.h; sourceTree = "<group>"; };
14951491
63AA76AE1EB9D5CD00D153DE /* SentryTests.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = SentryTests.xcconfig; sourceTree = "<group>"; };
14961492
63B818F71EC34639002FDF4C /* SentryDebugMeta.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentryDebugMeta.h; path = Public/SentryDebugMeta.h; sourceTree = "<group>"; };
14971493
63B818F81EC34639002FDF4C /* SentryDebugMeta.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SentryDebugMeta.m; sourceTree = "<group>"; };
@@ -2089,11 +2085,11 @@
20892085
A8AFFCD32907E0CA00967CD7 /* SentryRequestTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryRequestTests.swift; sourceTree = "<group>"; };
20902086
A8F17B2D2901765900990B25 /* SentryRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryRequest.m; sourceTree = "<group>"; };
20912087
A8F17B332902870300990B25 /* SentryHttpStatusCodeRange.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryHttpStatusCodeRange.m; sourceTree = "<group>"; };
2088+
AEA159AF2EDDF6AD000D37E2 /* SentryDsn.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryDsn.swift; sourceTree = "<group>"; };
20922089
D4009EB12D771BB90007AF30 /* SentryFileIOTrackerSwiftHelpersTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryFileIOTrackerSwiftHelpersTests.swift; sourceTree = "<group>"; };
20932090
D41415A62DEEE532003B14D5 /* SentryRedactViewHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryRedactViewHelper.swift; sourceTree = "<group>"; };
20942091
D41909922D48FFF6002B83D0 /* SentryNSDictionarySanitize+Tests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SentryNSDictionarySanitize+Tests.h"; sourceTree = "<group>"; };
20952092
D41909942D490006002B83D0 /* SentryNSDictionarySanitize+Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "SentryNSDictionarySanitize+Tests.m"; sourceTree = "<group>"; };
2096-
D4237B3C2EB39D9700FE027C /* SentryDsn+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "SentryDsn+Private.h"; path = "include/SentryDsn+Private.h"; sourceTree = "<group>"; };
20972093
D4291A6C2DD62AC800772088 /* SentryDispatchFactoryTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryDispatchFactoryTests.m; sourceTree = "<group>"; };
20982094
D42ADEE92E9CF42800753166 /* SentrySessionReplayEnvironmentChecker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentrySessionReplayEnvironmentChecker.swift; sourceTree = "<group>"; };
20992095
D42ADF362E9CF95500753166 /* SentrySessionReplayEnvironmentCheckerProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentrySessionReplayEnvironmentCheckerProvider.swift; sourceTree = "<group>"; };
@@ -2732,8 +2728,6 @@
27322728
7BAF3DCD243DCBFE008A5414 /* SentryTransportFactory.m */,
27332729
635B3F361EBC6E2500A6176D /* SentryAsynchronousOperation.h */,
27342730
635B3F371EBC6E2500A6176D /* SentryAsynchronousOperation.m */,
2735-
63AA76A41EB9CBC200D153DE /* SentryDsn.h */,
2736-
63AA76A11EB9CBAA00D153DE /* SentryDsn.m */,
27372731
7BAF3DD82440AEC8008A5414 /* SentryRequestManager.h */,
27382732
631E6D311EBC679C00712345 /* SentryQueueableRequestManager.h */,
27392733
631E6D321EBC679C00712345 /* SentryQueueableRequestManager.m */,
@@ -3110,7 +3104,6 @@
31103104
63AA76941EB9C1C200D153DE /* SentryClient.h */,
31113105
63AA75ED1EB8B3C400D153DE /* SentryClient.m */,
31123106
7B85DC1C24EFAFCD007D01D2 /* SentryClient+Private.h */,
3113-
D4237B3C2EB39D9700FE027C /* SentryDsn+Private.h */,
31143107
7B610D5E2512390E00B0B5D9 /* SentrySDK+Private.h */,
31153108
FA6555132E30181B009917BC /* SentrySDKInternal.h */,
31163109
FA6555152E30182B009917BC /* SentrySDKInternal.m */,
@@ -4493,6 +4486,7 @@
44934486
FA6251FE2EB52DD700BFC967 /* SentryHub.swift */,
44944487
FA6252052EB5489B00BFC967 /* SentryClient.swift */,
44954488
FA27EC152EB9236000F2ECF7 /* Options.swift */,
4489+
AEA159AF2EDDF6AD000D37E2 /* SentryDsn.swift */,
44964490
);
44974491
path = Swift;
44984492
sourceTree = "<group>";
@@ -5357,7 +5351,6 @@
53575351
9286059529A5096600F96038 /* SentryGeo.h in Headers */,
53585352
7B98D7BC25FB607300C5A389 /* SentryWatchdogTerminationTracker.h in Headers */,
53595353
8E4E7C7D25DAB287006AB9E2 /* SentryTracer.h in Headers */,
5360-
D4237B3D2EB39D9700FE027C /* SentryDsn+Private.h in Headers */,
53615354
7BC8523724588115005A70F0 /* SentryDataCategory.h in Headers */,
53625355
FAAB96482EA6843E0030A2DB /* SentryANRTrackerInternalDelegate.h in Headers */,
53635356
FA8A36182DEAA1EB0058D883 /* SentryThread+Private.h in Headers */,
@@ -5378,7 +5371,6 @@
53785371
848A451E2BBF9504006AAAEC /* SentryProfilerTestHelpers.h in Headers */,
53795372
639FCF9C1EBC7F9500778193 /* SentryThread.h in Headers */,
53805373
63FE716B20DA4C1100CDBAE8 /* SentryCrashJSONCodecObjC.h in Headers */,
5381-
63AA76A51EB9CBC200D153DE /* SentryDsn.h in Headers */,
53825374
844EDD6C2949387000C86F34 /* SentryMetricProfiler.h in Headers */,
53835375
F452438A2DE65968003E8F50 /* ExceptionCatcher.h in Headers */,
53845376
636085131ED47BE600E8599E /* SentryFileManagerHelper.h in Headers */,
@@ -5777,7 +5769,6 @@
57775769
FAAB2F972E4D345800FE8B7E /* SentryUIDeviceWrapper.swift in Sources */,
57785770
7B6438AB26A70F24000D0F65 /* UIViewController+Sentry.m in Sources */,
57795771
84302A812B5767A50027A629 /* SentryLaunchProfiling.m in Sources */,
5780-
63AA76A31EB9CBAA00D153DE /* SentryDsn.m in Sources */,
57815772
D490648A2DFAE1F600555785 /* SentryScreenshotOptions.swift in Sources */,
57825773
FA6FC0AA2E0B6B1100ED2669 /* SentrySdkInfo.swift in Sources */,
57835774
FA560F602E8C877200F2AF7F /* SentryAppStateManager.swift in Sources */,
@@ -6170,6 +6161,7 @@
61706161
620379DD2AFE1432005AC0C1 /* SentryBuildAppStartSpans.m in Sources */,
61716162
6292585F2DAFA8290049388F /* SentryCrashMach-O.c in Sources */,
61726163
7B77BE3727EC8460003C9020 /* SentryDiscardReasonMapper.m in Sources */,
6164+
AEA159B02EDDF6AD000D37E2 /* SentryDsn.swift in Sources */,
61736165
63FE712520DA4C1000CDBAE8 /* SentryCrashSignalInfo.c in Sources */,
61746166
63FE70F320DA4C1000CDBAE8 /* SentryCrashMonitor_Signal.c in Sources */,
61756167
D859696F27BECDA20036A46E /* SentryCoreDataTracker.m in Sources */,

Sources/Sentry/Public/Sentry.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ FOUNDATION_EXPORT const unsigned char SentryVersionString[];
1313
# import <Sentry/SentryCrashExceptionApplication.h>
1414
# import <Sentry/SentryDebugMeta.h>
1515
# import <Sentry/SentryDefines.h>
16-
# import <Sentry/SentryDsn.h>
1716
# import <Sentry/SentryError.h>
1817
# import <Sentry/SentryEvent.h>
1918
# import <Sentry/SentryException.h>

Sources/Sentry/Public/SentryDsn.h

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

Sources/Sentry/Public/SentryWithoutUIKit.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ FOUNDATION_EXPORT const unsigned char SentryVersionString[];
1414
# import <SentryWithoutUIKit/SentryCrashExceptionApplication.h>
1515
# import <SentryWithoutUIKit/SentryDebugMeta.h>
1616
# import <SentryWithoutUIKit/SentryDefines.h>
17-
# import <SentryWithoutUIKit/SentryDsn.h>
1817
# import <SentryWithoutUIKit/SentryError.h>
1918
# import <SentryWithoutUIKit/SentryEvent.h>
2019
# import <SentryWithoutUIKit/SentryException.h>

Sources/Sentry/SentryBaggage.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#import "SentryBaggage.h"
2-
#import "SentryDsn.h"
32
#import "SentryLogC.h"
43
#import "SentryScope+Private.h"
54
#import "SentrySwift.h"

Sources/Sentry/SentryClient.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#import "SentryCrashStackEntryMapper.h"
88
#import "SentryDefaultThreadInspector.h"
99
#import "SentryDeviceContextKeys.h"
10-
#import "SentryDsn.h"
1110
#import "SentryEvent+Private.h"
1211
#import "SentryException.h"
1312
#import "SentryInstallation.h"

Sources/Sentry/SentryDsn.m

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

Sources/Sentry/SentryFileManagerHelper.m

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#import "SentryFileManagerHelper.h"
22
#import "SentryDataCategoryMapper.h"
33
#import "SentryDateUtils.h"
4-
#import "SentryDsn+Private.h"
5-
#import "SentryDsn.h"
64
#import "SentryEnvelopeItemHeader.h"
75
#import "SentryError.h"
86
#import "SentryEvent.h"

0 commit comments

Comments
 (0)