Skip to content

Install and drive the runner on real Apple TV#2

Open
setoelkahfi wants to merge 1 commit into
feature/tvos-supportfrom
feature/tvos-real-device
Open

Install and drive the runner on real Apple TV#2
setoelkahfi wants to merge 1 commit into
feature/tvos-supportfrom
feature/tvos-real-device

Conversation

@setoelkahfi

@setoelkahfi setoelkahfi commented Jul 2, 2026

Copy link
Copy Markdown
Owner

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() returns tvos when the device ProductType starts with AppleTV (e.g. AppleTV14,1), otherwise ios. 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 install now handles a real tvOS target: it downloads devicekit-tvos-runner.ipa and re-signs it with the supplied provisioning profile. The iOS and tvOS install paths share a new installResignedRunner helper, so installAgentOnRealIOS and installAgentOnRealTVOS differ only in the artifact name.
  • agentMatchesApp suffix-matches the runner bundle id for both platforms, since re-signing on a real device adds a team prefix.
  • Unit tests for platform detection, packaging, and bundle-id matching.

Note on the checksum

The pinned SHA-256 for devicekit-tvos-runner.ipa is 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, and go 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:

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>
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.

1 participant