Real Apple TV (tvOS) automation: CoreDevice identity, agent lifecycle, tunnel transport#3
Closed
setoelkahfi wants to merge 4 commits into
Closed
Real Apple TV (tvOS) automation: CoreDevice identity, agent lifecycle, tunnel transport#3setoelkahfi wants to merge 4 commits into
setoelkahfi wants to merge 4 commits into
Conversation
mobilecli can now list and drive tvOS simulators, not just iOS ones. - Recognise tvOS runtimes when parsing the simulator runtime string and report the `tvos` platform. Version parsing now also handles tvOS, watchOS, and xrOS. - Pick the DeviceKit runner bundle id and process name based on the platform, so the `devicekit-tvosUITests` runner is found on tvOS. - Install the arm64 tvOS runner artifact during agent install, with its own version and checksum entries. - Map the tvOS Siri Remote buttons (UP, DOWN, LEFT, RIGHT, SELECT, MENU, PLAY_PAUSE) in the WDA press-button client. - Include tvOS devices when resolving device model metadata. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Real Apple TV units are discovered over the same go-ios path as iPhones and iPads, so detect them by product type (AppleTV*) and report platform tvos. Route real tvOS devices through a shared installResignedRunner helper that downloads devicekit-tvos-runner.ipa and re-signs it with the provisioning profile, and suffix-match the tvOS runner bundle id so the re-signed, team-prefixed id is recognised. Add unit tests for platform detection and agent matching. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Milestones 1-3 for real Apple TV automation: M1 - Retain both device identifiers (public hardware UDID + CoreDevice identifier) on IOSDevice; derive tvOS state from CoreDevice boot/tunnel state; add CoreDevice branches for terminate/install/ uninstall/openURL so real Apple TV app ops no longer hit go-ios 'device not found'. M2 - Add 'agent install --agent-path <ipa>' to sideload a locally built runner (skips download + pinned checksum, keeps re-sign + install); cache the signed runner and a generated .xctestrun under the app cache, bound to the device. Release path stays checksum-verified. M3 - Start the tvOS runner via 'xcodebuild test-without-building' with the cached .xctestrun and talk to the DeviceKit server directly over the CoreDevice tunnel IP (net.JoinHostPort, never LAN/0.0.0.0). Reuse healthy sessions, restart stale ones, own+clean up the child process on shutdown. Per-platform Siri Remote button gating; tvOS dump ui retains focusable element types. Also add 'mobilecli io focus' (device.io.focus RPC passthrough) for accessibility-identity focus, and device-free unit tests for identity retention, platform/state dispatch, artifact override, cache keying, button gating, and terminate PID resolution. Implements: SPECS/quality/real-tvos-device-support/SPEC.md (Milestones 1-3, 6) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Owner
Author
|
Superseded by upstream PR mobile-next#299. Keeping the branch as the source branch for upstream review. |
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.
Summary
Adds real Apple TV (tvOS) automation support to
mobilecliso a physical Apple TV discovered over CoreDevice can be driven end to end — device discovery, app lifecycle, agent install/lifecycle, accessibility dumps, screenshots, and Siri Remote input — without falling back to go-ios (device not found) or screenshot-guessed navigation.This is part of a three-repo change (initial PRs target the
setoelkahfiforks; upstreammobile-nextPRs are deferred until the three-repo E2E is green).What's in this PR (Milestones 1–3, 6)
IOSDevice; derive tvOSstatefrom CoreDevice boot/tunnel state; add CoreDevice (devicectl) branches forterminate/install/uninstall/openURLso real Apple TV app ops no longer hit the go-iosdevice not foundpath.agent install --agent-path <ipa>: sideload a locally built runner (skips download + pinned checksum, keeps re-sign + install); cache the signed runner and a generated.xctestrununder the app cache, device-bound. The release path stays checksum-verified.xcodebuild test-without-buildingwith the cached.xctestrun, and talk to the DeviceKit server directly over the CoreDevice tunnel IP (net.JoinHostPort, never LAN / never0.0.0.0). Reuse healthy sessions, restart stale ones, own + clean up the child process on shutdown. Per-platform Siri Remote button gating; tvOSdump uiretains focusable element types.mobilecli io focus(device.io.focusRPC passthrough) for accessibility-identity focus.--agent-pathoverride, cache keying, button gating, and terminate PID resolution.Validation
go build ./...,go test ./... -race(all packages),gofmtclean. Lint is advisory in CI (make lint || true); new files are lint-clean.Guardrails
Implements: SPECS/quality/real-tvos-device-support/SPEC.md
Related PRs (three-repo change)