Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- iOS: record the external display on tvOS simulators, where screen recordings were never captured
- iOS: don't hang the run forever when a simulator screen recording refuses to stop
- iOS: report screen recording as unsupported on physical devices instead of crashing with `TODO()`
- iOS: read the view hierarchy on a physical Apple TV, where the driver stopped on every request
- Web: record the screen over CDP when attached to a running Chrome/Electron, where recording used to be a silent no-op

## 2.8.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,15 @@ struct ViewHierarchyHandler: HTTPHandler {
let appHierarchy = try getHierarchyWithFallback(foregroundApp)
await SystemPermissionHelper.handleSystemPermissionAlertIfNeeded(appHierarchy: appHierarchy, foregroundApp: foregroundApp)

// tvOS has no status bar, and a physical Apple TV's home screen answers
// only while it is in the foreground, failing the whole request otherwise.
#if os(tvOS)
let statusBars: [AXElement] = []
#else
let statusBars = logger.measure(message: "Fetch status bar hierarchy") {
fullStatusBars(homescreenApplication)
} ?? []
#endif

// Fetch Safari WebView hierarchy for iOS 26+ (runs in separate SafariViewService process). Skip on tvOS.
#if os(tvOS)
Expand All @@ -74,7 +80,11 @@ struct ViewHierarchyHandler: HTTPHandler {
}
#endif

#if os(tvOS)
let deviceFrame = foregroundApp.frame
#else
let deviceFrame = homescreenApplication.frame
#endif
let deviceAxFrame = [
"X": Double(deviceFrame.minX),
"Y": Double(deviceFrame.minY),
Expand Down