Skip to content

Do not merge - #1204

Open
KazuCocoa wants to merge 12 commits into
masterfrom
headers-xcode27
Open

Do not merge#1204
KazuCocoa wants to merge 12 commits into
masterfrom
headers-xcode27

Conversation

@KazuCocoa

Copy link
Copy Markdown
Member

#1203 + #1202 to test out xcode 27.

mykola-mokhnach and others added 12 commits August 6, 2026 22:28
Refresh the vendored XCTest private headers (last fully regenerated ~2017)
from a current Xcode 26.6 header dump, for both iOS and tvOS. Apple has since
split private XCTest internals across XCUIAutomation/XCTestCore/
XCTAutomationSupport frameworks with real cross-header dependencies, so the
old flat class-dump-per-file layout no longer applies.

- Vendor only what WDA actually needs: the transitive closure of the 22
  headers WDA imports, cleaned up for compilation (duplicate property/method
  declarations, inline-redefined CGRect/CGPoint/CGSize/CGVector structs
  colliding with CoreGraphics, missing forward declarations, circular
  superclass #includes).
- For classes/protocols that are now genuine public Apple API (XCUIElement,
  XCUIApplication, XCTestCase, etc.), import the real public header and
  extend it with a private category containing only the delta members,
  instead of a full standalone redeclaration, to avoid conflicting with the
  real system module.
- XCEventGenerator is gone upstream; event synthesis now goes through
  XCUIDevice.eventSynthesizer. XCTestManager_ManagerInterface is renamed to
  XCTMessagingChannel_RunnerToDaemon. Port the protocol-version handshake to
  read XCTRunnerDaemonSession.remoteInterfaceCapabilities, falling back to
  the legacy selector on older daemons.
- Sync project.pbxproj header membership for WebDriverAgentLib and
  WebDriverAgentLib_tvOS to match the new file set.

Verified WebDriverAgentLib(_tvOS) and WebDriverAgentRunner(_tvOS) build
cleanly, and a live simulator run confirmed /status, session creation,
element queries, and event synthesis (coordinate tap) all work.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Companion commit to c79ef4d (the header refresh) — includes the consumer
code changes that update call sites for the renamed/restructured private
API, plus fixes found by running the unit/integration test suites against
the new headers on iOS 17.5 and 27.0 simulators:

- Retype daemonProxy/testRunnerProxy from XCTestManager_ManagerInterface to
  XCTMessagingChannel_RunnerToDaemon; port FBTestmanagerdVersion() to read
  XCTRunnerDaemonSession.remoteInterfaceCapabilities with a legacy fallback.
- Drop the XCEventGenerator import/typedef usage (class removed upstream);
  event synthesis already goes through XCUIDevice.eventSynthesizer.
- Add missing #imports for headers that used to be pulled in transitively
  through the old flat header set (XCTIssue, XCTSourceCodeContext/Location,
  XCTElementSetTransformer-Protocol, XCPointerEventPath).
- Fix XCUIHitPointResult.hittable: the ipsw dump dropped the
  'getter=isHittable' annotation the real class actually uses, causing
  -[XCUIHitPointResult hittable] to crash with unrecognized-selector at
  runtime; same defect fixed for 5 other BOOL properties across the header
  set (XCUISiriService, XCUIElement, XCTFuture, XCUIApplicationProcess,
  XCTRuntimeIssueDetectionPolicy, XCTMemoryChecker) that ipsw dumped the
  same way.
- Fix fb_nativeScrollToVisibleWithError: for Xcode 27 beta, which moved
  -_hitPointByAttemptingToScrollToVisibleSnapshot:error: off XCUIElement
  entirely, onto a new XCUIElementBaseEventTarget wrapper obtained via
  +forElement:, renamed to add "AX". Falls back to the direct legacy
  selector on older Xcode/testmanagerd where XCUIElement still implements
  it directly. Verified against the original headers that this was not
  a pre-existing failure — confirmed via ipsw-dumped binary symbol names.

Verified: WebDriverAgentLib(_tvOS)/WebDriverAgentRunner(_tvOS) build clean;
UnitTests pass 127/127 on both iOS 17.5 and 27.0 simulators; IntegrationTests_1
passes on both (excluding testNotificationAlert, which requires a simulator
reset to pass and is unrelated to this change).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…iOS version

PR #1171 switched fb_lockScreen: to a direct IOHID Power-button press on
iOS 27+ because testmanagerd on real devices never fires the
ButtonEventsCompleted confirmation for pressLockButton anymore, causing
POST /wda/lock to time out.

That fix broke locking on iOS 27 simulators: the IOHID path times out there
too (same ButtonEventsCompleted wait), even though pressLockButton itself
still works fine and locks the simulator correctly on iOS 27. Verified by
toggling the branch directly and running testLockUnlockScreen against a
live iOS 27.0 simulator.

Scope the IOHID workaround to real devices only; simulators keep using
pressLockButton on all iOS versions.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…e 15.4 compat

XCUIAutomation.framework isn't importable on older Xcode (e.g. 15.4 in CI),
where these classes still live under the XCTest umbrella. #import <XCTest/X.h>
resolves to the real declaration on old Xcode and to Apple's forwarding shim
on new Xcode, so it works on both.
Updated XCODE_VERSION for xcode-27 from '27.0' to '27.0.0'
@KazuCocoa KazuCocoa mentioned this pull request Aug 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants