Skip to content

Commit ab35ebe

Browse files
committed
Merge remote-tracking branch 'origin/main' into philprime/disable-live-activity-widgets
2 parents 25c6606 + 4773cd8 commit ab35ebe

Some content is hidden

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

47 files changed

+3509
-8429
lines changed

.github/actions/prepare-package.swift/action.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,14 @@ runs:
4343
env:
4444
PACKAGE_FILE: ${{ inputs.package-file }}
4545
run: |
46-
sed -i '' 's/url.*//g' $PACKAGE_FILE
46+
# Remove Sentry binary framework URLs and convert checksums to paths
47+
sed -i '' 's/url: "https:\/\/github\.com\/getsentry\/sentry-cocoa\/releases\/download\/.*"//g' $PACKAGE_FILE
4748
sed -i '' 's/checksum: ".*" \/\/Sentry-Static/path: "Sentry.xcframework.zip"/g' $PACKAGE_FILE
4849
sed -i '' 's/checksum: ".*" \/\/Sentry-Dynamic-WithARM64e/path: "Sentry-Dynamic-WithARM64e.xcframework.zip"/g' $PACKAGE_FILE
4950
sed -i '' 's/checksum: ".*" \/\/Sentry-Dynamic/path: "Sentry-Dynamic.xcframework.zip"/g' $PACKAGE_FILE
5051
sed -i '' 's/checksum: ".*" \/\/Sentry-WithoutUIKitOrAppKit-WithARM64e/path: "Sentry-WithoutUIKitOrAppKit-WithARM64e.xcframework.zip"/g' $PACKAGE_FILE
5152
sed -i '' 's/checksum: ".*" \/\/Sentry-WithoutUIKitOrAppKit/path: "Sentry-WithoutUIKitOrAppKit.xcframework.zip"/g' $PACKAGE_FILE
53+
# Clean up orphaned commas and fix syntax
54+
sed -i '' '/^[[:space:]]*,$/d' $PACKAGE_FILE
55+
sed -i '' 's/name: "Sentry\(-.*\)\?"$/name: "Sentry\1",/g' $PACKAGE_FILE
56+
sed -i '' 's/platforms: \[\.iOS(\.v11), \.macOS(\.v10_13), \.tvOS(\.v11), \.watchOS(\.v4)\]$/platforms: [.iOS(.v11), .macOS(.v10_13), .tvOS(.v11), .watchOS(.v4)],/g' $PACKAGE_FILE

.github/workflows/test.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,16 @@ jobs:
330330
device: "iPhone 15 Pro"
331331
scheme: "SentrySwiftUI"
332332

333+
# iOS 17 - Use pre-installed iOS 17.5 runtime on macOS-14 with Xcode 15.4
334+
- name: iOS 17 SentrySwiftLog
335+
runs-on: macos-14
336+
xcode: "15.4"
337+
test-destination-os: "17.5"
338+
platform: "iOS"
339+
create_device: true
340+
device: "iPhone 15 Pro"
341+
scheme: "SentrySwiftLog"
342+
333343
# tvOS 18
334344
- name: tvOS 18 Sentry
335345
runs-on: macos-15

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,14 @@
1313
- Remove legacy profiling, the only supported profiling is now what was known as continuous V2 (#6386)
1414
- Removes deprecated useSpan function (#5591)
1515
- Makes app hang tracking V2 the default and removes the option to enable/disable it (#5615)
16+
- Removes initializers for SentryTraceContext from the public API (#6662)
1617
- Removes `integrations` property from `SentryOptions` (#5749)
18+
- Removes `defaultIntegrations` function from `SentryOptions` (#6664)
1719
- Makes `SentryEventDecodable` internal (#5808)
1820
- The `span` property on `SentryScope` is now readonly (#5866)
21+
- Removes `SentryIntegrationProtocol` from the API. This is not used after the removal of the `integrations` property (#6660)
1922
- Removes deprecated SentryDebugImageProvider class (#5598)
23+
- Properties on SentryOptions that had no effect on the WithoutUIKit variant are now removed from the API (#6644)
2024
- Removes segment property on SentryUser, SentryBaggage, and SentryTraceContext (#5638)
2125
- Removes deprecated TraceContext initializers (#6348)
2226
- Removes deprecated user feedback API, this is replaced with the new feedback API (#5591)
@@ -35,6 +39,7 @@
3539
- Set `SentryException.type` to `nil` when `NSException` has no `reason` (#6653). The backend then can provide a proper message when there is no reason.
3640
- App hang tracking is now automatically disabled for Widgets, Live Activities, Intent Extensions, and Action Extensions (#3901).
3741
These components run in separate processes or sandboxes with different execution characteristics, which can cause false positive app hang reports.
42+
- Rename `SentryLog.Level` and `SentryLog.Attribute` for ObjC (#6666)
3843

3944
### Features
4045

@@ -45,6 +50,7 @@
4550
This option is still disabled by default and will be enabled in a future major release.
4651
- Move `enableDataSwizzling` from experimental options to top-level options (#6592). This option remains enabled by default.
4752
- Add `sentry.replay_id` attribute to logs ([#6515](https://github.com/getsentry/sentry-cocoa/pull/6515))
53+
- Structured Logs: Add `SentrySwiftLog` Integration (#6286)
4854

4955
### Fixes
5056

@@ -64,10 +70,14 @@
6470
- Fix axis-aligned transform detection for optimized opaque view clipping
6571
- Rename `SentryMechanismMeta` to `SentryMechanismContext` to resolve Kotlin Multi-Platform build errors (#6607)
6672
- Fix conversion of frame rate to time interval for session replay (#6623)
73+
- Change Session Replay masking to prevent semi‑transparent full‑screen overlays from clearing redactions by making opaque clipping stricter (#6629)
74+
Views now need to be fully opaque (view and layer backgrounds with alpha == 1) and report opaque to qualify for clip‑out.
75+
This avoids leaks at the cost of fewer clip‑out optimizations.
6776

6877
### Improvements
6978

7079
- Replace deprecated SCNetworkReachability with NWPathMonitor (#6019)
80+
- Expose attachment type on `SentryAttachment` for downstream SDKs (like sentry-godot) (#6521)
7181
- Increase attachment max size to 100MB (#6537)
7282

7383
## 8.57.1

Package.swift

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ var products: [Product] = [
1616
.library(name: "Sentry-WithoutUIKitOrAppKit", targets: ["Sentry-WithoutUIKitOrAppKit", "SentryCppHelper"]),
1717
.library(name: "Sentry-WithoutUIKitOrAppKit-WithARM64e", targets: ["Sentry-WithoutUIKitOrAppKit-WithARM64e", "SentryCppHelper"]),
1818
.library(name: "SentrySwiftUI", targets: ["Sentry", "SentrySwiftUI", "SentryCppHelper"]),
19-
.library(name: "SentryDistribution", targets: ["SentryDistribution"])
19+
.library(name: "SentryDistribution", targets: ["SentryDistribution"]),
20+
.library(name: "SentrySwiftLog", targets: ["Sentry", "SentrySwiftLog"])
2021
]
2122

2223
var targets: [Target] = [
@@ -45,21 +46,31 @@ var targets: [Target] = [
4546
url: "https://github.com/getsentry/sentry-cocoa/releases/download/8.57.1/Sentry-WithoutUIKitOrAppKit-WithARM64e.xcframework.zip",
4647
checksum: "6f3b991969a02f02878d052d0edf7076110f0ea577f84b2c5ad706a9bd302c54" //Sentry-WithoutUIKitOrAppKit-WithARM64e
4748
),
48-
.target (
49+
.target(
4950
name: "SentrySwiftUI",
5051
dependencies: ["Sentry", "SentryInternal"],
5152
path: "Sources/SentrySwiftUI",
5253
exclude: ["SentryInternal/", "module.modulemap"],
5354
linkerSettings: [
5455
.linkedFramework("Sentry")
55-
]),
56+
]
57+
),
58+
.target(
59+
name: "SentrySwiftLog",
60+
dependencies: ["Sentry", .product(name: "Logging", package: "swift-log")],
61+
path: "Sources/SentrySwiftLog",
62+
linkerSettings: [
63+
.linkedFramework("Sentry")
64+
]
65+
),
5666
.target(
5767
name: "SentryInternal",
5868
path: "Sources/SentrySwiftUI",
5969
sources: [
6070
"SentryInternal/"
6171
],
62-
publicHeadersPath: "SentryInternal/"),
72+
publicHeadersPath: "SentryInternal/"
73+
),
6374
.target(
6475
name: "SentryCppHelper",
6576
dependencies: ["Sentry"],
@@ -101,7 +112,7 @@ if let env = env, String(cString: env, encoding: .utf8) == "1" {
101112
name: "SentryObjc",
102113
dependencies: ["SentrySwift"],
103114
path: "Sources",
104-
exclude: ["Sentry/SentryDummyPublicEmptyClass.m", "Sentry/SentryDummyPrivateEmptyClass.m", "Swift", "SentrySwiftUI", "Resources", "Configuration", "SentryCppHelper", "SentryDistribution", "SentryDistributionTests"],
115+
exclude: ["Sentry/SentryDummyPublicEmptyClass.m", "Sentry/SentryDummyPrivateEmptyClass.m", "Swift", "SentrySwiftUI", "SentrySwiftLog", "Resources", "Configuration", "SentryCppHelper", "SentryDistribution", "SentryDistributionTests"],
105116
cSettings: [
106117
.headerSearchPath("Sentry/include/HybridPublic"),
107118
.headerSearchPath("Sentry"),
@@ -118,6 +129,12 @@ let package = Package(
118129
name: "Sentry",
119130
platforms: [.iOS(.v15), .macOS(.v12), .tvOS(.v15), .watchOS(.v8)],
120131
products: products,
132+
dependencies: [
133+
// SPM doesn't support peer-dependencies, so users are locked into our declared version.
134+
// Using `from: "1.6.0"` covers 1.6.0 < 2.0.0, resolving minor versions automatically.
135+
// See develop-docs/DECISIONS.md for discussion.
136+
.package(url: "https://github.com/apple/swift-log", from: "1.6.0")
137+
],
121138
targets: targets,
122139
cxxLanguageStandard: .cxx14
123140
)
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"configurations" : [
3+
{
4+
"id" : "EBB4F92C-3CA9-47E0-8589-7934881F1E4B",
5+
"name" : "Configuration 1",
6+
"options" : {
7+
8+
}
9+
}
10+
],
11+
"defaultOptions" : {
12+
"codeCoverage" : true
13+
},
14+
"testTargets" : [
15+
{
16+
"target" : {
17+
"containerPath" : "container:Sentry.xcodeproj",
18+
"identifier" : "9241AC1A2EBA38CC00E611ED",
19+
"name" : "SentrySwiftLogTests"
20+
}
21+
}
22+
],
23+
"version" : 1
24+
}

Samples/iOS-Swift/iOS-Swift.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ targets:
3232
- target: iOS-SwiftClip
3333
- target: SentrySampleShared/SentrySampleShared
3434
- target: iOS-Swift-ShareExtension
35+
- target: Sentry/SentrySwiftLog
3536
configFiles:
3637
Debug: iOS-Swift.xcconfig
3738
Release: iOS-Swift.xcconfig

Samples/iOS-Swift/iOS-Swift/AppDelegate.swift

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import SentrySampleShared
22
import UIKit
33

4+
import Logging
5+
import SentrySwiftLog
6+
47
@UIApplicationMain
58
class AppDelegate: UIResponder, UIApplicationDelegate {
69
private var randomDistributionTimer: Timer?
@@ -24,11 +27,22 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2427

2528
SentrySDKWrapper.shared.startSentry()
2629
SampleAppDebugMenu.shared.display()
27-
30+
2831
if #available(iOS 15.0, *) {
2932
metricKit.receiveReports()
3033
}
3134

35+
// Use structured logs with swift-log
36+
LoggingSystem.bootstrap { _ in
37+
return SentryLogHandler(logLevel: .trace)
38+
}
39+
let logger = Logger(label: "io.sentry.iOS-Swift")
40+
logger.trace(
41+
"[iOS-Swift] didFinishLaunchingWithOptions",
42+
metadata: ["foo": "bar"],
43+
source: "iOS"
44+
)
45+
3246
return true
3347
}
3448

Samples/iOS15-SwiftUI/iOS15-SwiftUI/ContentView.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ struct ContentView: View {
88
await captureErrorAsync()
99
}
1010
}
11-
1211
func captureErrorAsync() async {
1312
let error = NSError(domain: "SampleErrorDomain", code: 1, userInfo: [NSLocalizedDescriptionKey: "Object does not exist"])
1413
SentrySDK.capture(error: error)

0 commit comments

Comments
 (0)