Skip to content
Merged
Changes from all commits
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
12 changes: 11 additions & 1 deletion WebDriverAgentLib/Categories/XCUIDevice+FBHelpers.m
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,17 @@ - (BOOL)fb_lockScreen:(NSError **)error
if (fb_isLocked) {
return YES;
}
[self pressLockButton];
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"27.0")) {
// iOS 27: pressLockButton no longer locks; use a direct IOHID Power press (0x0C/0x30, ~0.5s hold).
if (![self fb_performIOHIDEventWithPage:0x0C
usage:0x30
duration:0.5
error:error]) {
return NO;
}
} else {
[self pressLockButton];
}
return [[[[FBRunLoopSpinner new]
timeout:FBScreenLockTimeout]
timeoutErrorMessage:@"Timed out while waiting until the screen gets locked"]
Expand Down