Install and drive the runner on real Apple TV#2
Open
setoelkahfi wants to merge 1 commit into
Open
Conversation
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>
This was referenced Jul 2, 2026
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.
Builds on top of mobile-next#292 (tvOS simulator support) to install and drive the runner on a real Apple TV, mirroring the existing iOS real-device path.
What this adds
IOSDevice.Platform()returnstvoswhen the deviceProductTypestarts withAppleTV(e.g.AppleTV14,1), otherwiseios. Real Apple TVs connect over the network but enumerate through the same go-ios/usbmuxd path as iPhones and iPads, so product type is the reliable discriminator.agent installnow handles a real tvOS target: it downloadsdevicekit-tvos-runner.ipaand re-signs it with the supplied provisioning profile. The iOS and tvOS install paths share a newinstallResignedRunnerhelper, soinstallAgentOnRealIOSandinstallAgentOnRealTVOSdiffer only in the artifact name.agentMatchesAppsuffix-matches the runner bundle id for both platforms, since re-signing on a real device adds a team prefix.Note on the checksum
The pinned SHA-256 for
devicekit-tvos-runner.ipais a placeholder (all zeros) with a TODO, because the artifact isn't published from a devicekit-ios release yet. Real installs will fail checksum verification until that's filled in. This follows the same convention as the existing tvos-Sim checksum note.Verification
go build ./...,go vet, andgo test ./cli/... ./utils/... ./devices/...all pass. Full physical install needs Apple TV hardware plus a published runner IPA, which I couldn't do here.Related PRs: