Skip to content

Commit e89eab0

Browse files
committed
Merge remote-tracking branch 'origin/main' into philprime/log-batcher-abstraction
2 parents b1891d3 + ef238a7 commit e89eab0

25 files changed

+541
-408
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848

4949
build-test-server:
5050
name: Build test server
51-
if: needs.files-changed.outputs.run_unit_tests_for_prs == 'true'
51+
if: github.event_name != 'pull_request' || needs.files-changed.outputs.run_unit_tests_for_prs == 'true'
5252
needs: files-changed
5353
runs-on: macos-15
5454
steps:
@@ -236,7 +236,7 @@ jobs:
236236
with:
237237
name: ${{matrix.name}}
238238
runs-on: ${{ matrix.runs-on }}
239-
should_skip: ${{needs.files-changed.outputs.run_unit_tests_for_prs != 'true'}}
239+
should_skip: ${{github.event_name == 'pull_request' && needs.files-changed.outputs.run_unit_tests_for_prs != 'true'}}
240240
xcode: ${{matrix.xcode}}
241241
platform: ${{matrix.platform}}
242242
test-destination-os: ${{matrix.test-destination-os || 'latest'}}

CHANGELOG.md

Lines changed: 9 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)
@@ -13,6 +21,7 @@
1321

1422
### Fixes
1523

24+
- Save app context information (release name, dist, environment) on app hang events before saving to disk to prevent incorrect version information when an app hang turns fatal (#6998)
1625
- Disabled automatic session tracking in system extensions to prevent extension blocking and unwanted dock icon behavior (#6962) (#6962)
1726
- Fixes crash when null values are passed to `UIApplication sendAction:to:from:forEvent:` (#6970)
1827
- Fixes `user.id` not set to installationId if no user is set (#7005)

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 */; };
@@ -1492,8 +1490,6 @@
14921490
63AA76951EB9C1C200D153DE /* SentryDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentryDefines.h; path = Public/SentryDefines.h; sourceTree = "<group>"; };
14931491
63AA769B1EB9C57A00D153DE /* SentryError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentryError.h; path = Public/SentryError.h; sourceTree = "<group>"; };
14941492
63AA769C1EB9C57A00D153DE /* SentryError.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SentryError.mm; sourceTree = "<group>"; };
1495-
63AA76A11EB9CBAA00D153DE /* SentryDsn.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SentryDsn.m; sourceTree = "<group>"; };
1496-
63AA76A41EB9CBC200D153DE /* SentryDsn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentryDsn.h; path = Public/SentryDsn.h; sourceTree = "<group>"; };
14971493
63AA76AE1EB9D5CD00D153DE /* SentryTests.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = SentryTests.xcconfig; sourceTree = "<group>"; };
14981494
63B818F71EC34639002FDF4C /* SentryDebugMeta.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentryDebugMeta.h; path = Public/SentryDebugMeta.h; sourceTree = "<group>"; };
14991495
63B818F81EC34639002FDF4C /* SentryDebugMeta.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SentryDebugMeta.m; sourceTree = "<group>"; };
@@ -2091,11 +2087,11 @@
20912087
A8AFFCD32907E0CA00967CD7 /* SentryRequestTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryRequestTests.swift; sourceTree = "<group>"; };
20922088
A8F17B2D2901765900990B25 /* SentryRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryRequest.m; sourceTree = "<group>"; };
20932089
A8F17B332902870300990B25 /* SentryHttpStatusCodeRange.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryHttpStatusCodeRange.m; sourceTree = "<group>"; };
2090+
AEA159AF2EDDF6AD000D37E2 /* SentryDsn.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryDsn.swift; sourceTree = "<group>"; };
20942091
D4009EB12D771BB90007AF30 /* SentryFileIOTrackerSwiftHelpersTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryFileIOTrackerSwiftHelpersTests.swift; sourceTree = "<group>"; };
20952092
D41415A62DEEE532003B14D5 /* SentryRedactViewHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryRedactViewHelper.swift; sourceTree = "<group>"; };
20962093
D41909922D48FFF6002B83D0 /* SentryNSDictionarySanitize+Tests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SentryNSDictionarySanitize+Tests.h"; sourceTree = "<group>"; };
20972094
D41909942D490006002B83D0 /* SentryNSDictionarySanitize+Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "SentryNSDictionarySanitize+Tests.m"; sourceTree = "<group>"; };
2098-
D4237B3C2EB39D9700FE027C /* SentryDsn+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "SentryDsn+Private.h"; path = "include/SentryDsn+Private.h"; sourceTree = "<group>"; };
20992095
D4291A6C2DD62AC800772088 /* SentryDispatchFactoryTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryDispatchFactoryTests.m; sourceTree = "<group>"; };
21002096
D42ADEE92E9CF42800753166 /* SentrySessionReplayEnvironmentChecker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentrySessionReplayEnvironmentChecker.swift; sourceTree = "<group>"; };
21012097
D42ADF362E9CF95500753166 /* SentrySessionReplayEnvironmentCheckerProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentrySessionReplayEnvironmentCheckerProvider.swift; sourceTree = "<group>"; };
@@ -2736,8 +2732,6 @@
27362732
7BAF3DCD243DCBFE008A5414 /* SentryTransportFactory.m */,
27372733
635B3F361EBC6E2500A6176D /* SentryAsynchronousOperation.h */,
27382734
635B3F371EBC6E2500A6176D /* SentryAsynchronousOperation.m */,
2739-
63AA76A41EB9CBC200D153DE /* SentryDsn.h */,
2740-
63AA76A11EB9CBAA00D153DE /* SentryDsn.m */,
27412735
7BAF3DD82440AEC8008A5414 /* SentryRequestManager.h */,
27422736
631E6D311EBC679C00712345 /* SentryQueueableRequestManager.h */,
27432737
631E6D321EBC679C00712345 /* SentryQueueableRequestManager.m */,
@@ -3115,7 +3109,6 @@
31153109
63AA76941EB9C1C200D153DE /* SentryClient.h */,
31163110
63AA75ED1EB8B3C400D153DE /* SentryClient.m */,
31173111
7B85DC1C24EFAFCD007D01D2 /* SentryClient+Private.h */,
3118-
D4237B3C2EB39D9700FE027C /* SentryDsn+Private.h */,
31193112
7B610D5E2512390E00B0B5D9 /* SentrySDK+Private.h */,
31203113
FA6555132E30181B009917BC /* SentrySDKInternal.h */,
31213114
FA6555152E30182B009917BC /* SentrySDKInternal.m */,
@@ -4498,6 +4491,7 @@
44984491
FA6251FE2EB52DD700BFC967 /* SentryHub.swift */,
44994492
FA6252052EB5489B00BFC967 /* SentryClient.swift */,
45004493
FA27EC152EB9236000F2ECF7 /* Options.swift */,
4494+
AEA159AF2EDDF6AD000D37E2 /* SentryDsn.swift */,
45014495
);
45024496
path = Swift;
45034497
sourceTree = "<group>";
@@ -5363,7 +5357,6 @@
53635357
9286059529A5096600F96038 /* SentryGeo.h in Headers */,
53645358
7B98D7BC25FB607300C5A389 /* SentryWatchdogTerminationTracker.h in Headers */,
53655359
8E4E7C7D25DAB287006AB9E2 /* SentryTracer.h in Headers */,
5366-
D4237B3D2EB39D9700FE027C /* SentryDsn+Private.h in Headers */,
53675360
7BC8523724588115005A70F0 /* SentryDataCategory.h in Headers */,
53685361
FAAB96482EA6843E0030A2DB /* SentryANRTrackerInternalDelegate.h in Headers */,
53695362
FA8A36182DEAA1EB0058D883 /* SentryThread+Private.h in Headers */,
@@ -5384,7 +5377,6 @@
53845377
848A451E2BBF9504006AAAEC /* SentryProfilerTestHelpers.h in Headers */,
53855378
639FCF9C1EBC7F9500778193 /* SentryThread.h in Headers */,
53865379
63FE716B20DA4C1100CDBAE8 /* SentryCrashJSONCodecObjC.h in Headers */,
5387-
63AA76A51EB9CBC200D153DE /* SentryDsn.h in Headers */,
53885380
844EDD6C2949387000C86F34 /* SentryMetricProfiler.h in Headers */,
53895381
F452438A2DE65968003E8F50 /* ExceptionCatcher.h in Headers */,
53905382
636085131ED47BE600E8599E /* SentryFileManagerHelper.h in Headers */,
@@ -5783,7 +5775,6 @@
57835775
FAAB2F972E4D345800FE8B7E /* SentryUIDeviceWrapper.swift in Sources */,
57845776
7B6438AB26A70F24000D0F65 /* UIViewController+Sentry.m in Sources */,
57855777
84302A812B5767A50027A629 /* SentryLaunchProfiling.m in Sources */,
5786-
63AA76A31EB9CBAA00D153DE /* SentryDsn.m in Sources */,
57875778
D490648A2DFAE1F600555785 /* SentryScreenshotOptions.swift in Sources */,
57885779
FA6FC0AA2E0B6B1100ED2669 /* SentrySdkInfo.swift in Sources */,
57895780
FA560F602E8C877200F2AF7F /* SentryAppStateManager.swift in Sources */,
@@ -6177,6 +6168,7 @@
61776168
620379DD2AFE1432005AC0C1 /* SentryBuildAppStartSpans.m in Sources */,
61786169
6292585F2DAFA8290049388F /* SentryCrashMach-O.c in Sources */,
61796170
7B77BE3727EC8460003C9020 /* SentryDiscardReasonMapper.m in Sources */,
6171+
AEA159B02EDDF6AD000D37E2 /* SentryDsn.swift in Sources */,
61806172
63FE712520DA4C1000CDBAE8 /* SentryCrashSignalInfo.c in Sources */,
61816173
63FE70F320DA4C1000CDBAE8 /* SentryCrashMonitor_Signal.c in Sources */,
61826174
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/SentryANRTrackingIntegration.m

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,31 @@ - (void)anrDetectedWithType:(enum SentryANRType)type
180180
[scope applyToEvent:event maxBreadcrumb:options.maxBreadcrumbs];
181181
}
182182

183+
[self applyOptions:options toEvent:event];
184+
183185
[self.fileManager storeAppHangEvent:event];
184186
#else
185187
[SentrySDK captureEvent:event];
186188
#endif
187189
}
188190

191+
- (void)applyOptions:(SentryOptions *)options toEvent:(SentryEvent *)event
192+
{
193+
// We need to apply the release name now, if the app hang turns into a fatal one
194+
// we might en up submitting a wrong version.
195+
event.releaseName = options.releaseName;
196+
197+
// Only apply dist if it wasn't set by the Scope previously
198+
if (event.dist == nil && options.dist != nil) {
199+
event.dist = options.dist;
200+
}
201+
202+
// Only apply environment if it wasn't set by the Scope previously
203+
if (event.environment == nil && options.environment != nil) {
204+
event.environment = options.environment;
205+
}
206+
}
207+
189208
- (void)anrStoppedWithResult:(SentryANRStoppedResult *_Nullable)result
190209
{
191210
#if SENTRY_HAS_UIKIT

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"

0 commit comments

Comments
 (0)