Skip to content

Commit 47fa61a

Browse files
committed
Merge remote-tracking branch 'origin/v8.x' into philprime/v8-57-3-fixes
2 parents aa43aea + f73c5c8 commit 47fa61a

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,13 @@
139139
- Move `enableDataSwizzling` from experimental options to top-level options (#6592). This option remains enabled by default.
140140
- Add `sentry.replay_id` attribute to logs ([#6515](https://github.com/getsentry/sentry-cocoa/pull/6515))
141141

142+
## 8.57.3
143+
144+
### Fixes
145+
146+
- Remove unnecesary dependency on `SentryCppHelper` to Sentry (#6754) (#6761)
147+
- Resolve SDK crash caused by UIPrintPanelViewController incorrectly casting to UISplitViewController (#6771)
148+
142149
## 8.57.2
143150

144151
### Fixes

Sources/Swift/Helper/SentryApplicationExtensions.swift

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,18 @@ extension SentryApplication {
134134
return nil
135135
}
136136
}
137+
137138
if let splitViewController = vc as? UISplitViewController {
138-
if splitViewController.viewControllers.count > 0 {
139+
// We encountered a case where the private class `UIPrintPanelViewController` overrides the `isKindOfClass:` method and wrongfully
140+
// allows casting to `UISplitViewController`, while not actually being a subclass:
141+
//
142+
// -[UIPrintPanelViewController viewControllers]: unrecognized selector sent to instance 0x124f45e00
143+
//
144+
// Check if the selector exists as a double-check mechanism
145+
// See: https://github.com/getsentry/sentry-cocoa/issues/6725
146+
if !splitViewController.responds(to: NSSelectorFromString("viewControllers")) {
147+
SentrySDKLog.warning("Failed to get viewControllers from UISplitViewController. This is a known bug in iOS 26.1")
148+
} else if splitViewController.viewControllers.count > 0 {
139149
return splitViewController.viewControllers
140150
}
141151
}

0 commit comments

Comments
 (0)