Skip to content

Commit 76515db

Browse files
mrvissercbFishbowler
authored andcommitted
fix(ios): fall back to SpringBoard hierarchy when DockFolderViewService is foreground (iOS 26 iPad)
1 parent 6cba126 commit 76515db

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

maestro-ios-xctest-runner/maestro-driver-iosUITests/Routes/Handlers/ViewHierarchyHandler.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ struct ViewHierarchyHandler: HTTPHandler {
4545
}
4646

4747
func getAppViewHierarchy(foregroundApp: XCUIApplication, excludeKeyboardElements: Bool) async throws -> AXElement {
48+
// On iOS 26 iPad, com.apple.DocumentManager.DockFolderViewService is reported as the
49+
// foreground process on the home screen, but its AX hierarchy is empty. The actual
50+
// home screen content lives in SpringBoard. Fall back to SpringBoard when detected.
51+
var foregroundApp = foregroundApp
52+
if foregroundApp.bundleID == "com.apple.DocumentManager.DockFolderViewService" {
53+
NSLog("DockFolderViewService detected as foreground, using SpringBoard hierarchy instead")
54+
foregroundApp = springboardApplication
55+
}
4856
let appHierarchy = try getHierarchyWithFallback(foregroundApp)
4957
await SystemPermissionHelper.handleSystemPermissionAlertIfNeeded(appHierarchy: appHierarchy, foregroundApp: foregroundApp)
5058

0 commit comments

Comments
 (0)