feat: Add tvOS simulator support#292
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>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThis PR adds tvOS simulator support to agent installation and simulator device handling. It introduces tvOS agent metadata, artifact checksums, platform dispatch, and arm64-only artifact selection. Simulator runtime parsing now derives tvOS and other platform identifiers, with platform-specific runner bundle and process discovery. Device information supports tvOS model extraction, and Siri Remote button mappings are added to 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
cli/agent.go (1)
270-283: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
runtime.GOARCHblocks Rosetta-on-Apple-Silicon installs. An amd64 CLI build still maps tox86_64, so the tvOS branch rejects the arm64 simulator runner even on a supported Apple Silicon host. Use host/simulator architecture here instead.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@cli/agent.go` around lines 270 - 283, The tvOS install path in installAgentOnSimulator is using runtime.GOARCH to decide the runner architecture, which incorrectly rejects Apple Silicon hosts running an amd64 CLI under Rosetta. Update the architecture selection logic in installAgentOnSimulator so it uses the actual host/simulator architecture rather than the Go build architecture, and keep the tvOS arm64-only check aligned with that value so supported Apple Silicon installs are not blocked.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@cli/agent.go`:
- Around line 31-33: The pinned tvOS archive checksum in the install mapping is
still tied to a locally built artifact, so the new tvOS path in
downloadAndInstallAgent() cannot verify the GitHub release successfully. Update
the checksum/version entry used for the devicekit-tvos-Sim-arm64.zip artifact to
match the published release before shipping, or add an explicit early error in
downloadAndInstallAgent() / the tvOS install path that reports the runner is not
published yet instead of attempting the install.
---
Outside diff comments:
In `@cli/agent.go`:
- Around line 270-283: The tvOS install path in installAgentOnSimulator is using
runtime.GOARCH to decide the runner architecture, which incorrectly rejects
Apple Silicon hosts running an amd64 CLI under Rosetta. Update the architecture
selection logic in installAgentOnSimulator so it uses the actual host/simulator
architecture rather than the Go build architecture, and keep the tvOS arm64-only
check aligned with that value so supported Apple Silicon installs are not
blocked.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 90092912-a644-496c-a26a-41e70ca2ab3c
📒 Files selected for processing (5)
cli/agent.godevices/common.godevices/ios.godevices/simulator.godevices/wda/press-button.go
|
@setoelkahfi thank you so much for this PR. I'll take a look. I see you also updated mobile-mcp, thank you so much for this! This also means mobilewright may inherit this automatically :). I'll review. |
|
hey @gmegidish , friendly bump, could we get this in? it'd be really helpful so I can iterate on adding support for the real tvOS device happy to address any feedback |
|
@setoelkahfi thank you for this. I need time to actually test it on a simulator, to make sure it all works. and it also depends on a change in devicekit-ios. I'll get to that soon. sorry it's taking me so long :( |
What
mobilecli can now list and drive tvOS simulators, not just iOS ones.
Changes
tvosplatform. Version parsing also handles tvOS, watchOS, and xrOS.devicekit-tvosUITestsrunner is found on tvOS.agent install, with its own version and checksum entries. The tvOS runner is arm64-only for now.Notes
The tvOS runner checksum currently points at a locally built artifact. Update it once the runner is published from a devicekit-ios release.
Testing
mobilecli deviceslists a booted tvOS simulator withplatform: tvos, andio buttonpresses move its focus as expected.Related