Do not merge - #1204
Open
KazuCocoa wants to merge 12 commits into
Open
Conversation
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'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#1203 + #1202 to test out xcode 27.