Skip to content

feat: add tvOS support#3021

Open
DouweBos wants to merge 4 commits into
mobile-dev-inc:mainfrom
DouweBos:main
Open

feat: add tvOS support#3021
DouweBos wants to merge 4 commits into
mobile-dev-inc:mainfrom
DouweBos:main

Conversation

@DouweBos

@DouweBos DouweBos commented Feb 28, 2026

Copy link
Copy Markdown

This PR is only so big because this embeds a RN TV app for the E2E testing. Scope can get reduced, but that also means reducing the test suite.

Features

CLI

Adds tvOS as a named CLI platform, building on the driver work from #2067 by @maxphillipsdev.
Made some additional changes in the device picker to separate out iOS and tvOS devices fully.

Since their UX paradigms are different enough, and any tests previously written against iOS platforms are per definition non-functional on tvOS simulators I felt like this was not a breaking change. Happy to merge the tvOS platform logic back into the iOS one though if you all disagree.

Testing

  • maestro --platform tvos test ... connects to a booted Apple TV simulator and installs the tvOS driver.
  • maestro --platform ios test ... no longer shows Apple TV simulators in the device picker
  • maestro studio should optionally show a device picker listing Apple TV simulators. Should connect to said simulator upon selection.

tvOS Settings flow

appId: com.apple.TVSettings
---
- launchApp

- waitForAnimationToEnd:
    timeout: 1000

- assertVisible: "General"

- pressKey: "Remote Dpad Center"

- pressKey: "Remote Dpad Down"

- pressKey: "Remote Dpad Down"

- pressKey: "Remote Menu"

- pressKey: "Remote Dpad Down"

- pressKey: "Remote Dpad Down"

- pressKey: "Remote Dpad Center"

- assertVisible: "Video and Audio"

- pressKey: "Remote Menu"

- pressKey: "Home"

Fixes

Fixes a pre-existing bug in PickDeviceView where devices were displayed grouped by platform but indexed against the original unsorted list, causing the wrong device to be selected when multiple platforms were listed together.

Screenshots / Recordings

TV Settings Flow

Screen.Recording.2026-02-28.at.23.47.29.mov

Device Picker

Screen.Recording.2026-02-28.at.23.54.32.mov

Simple Test Flow

Screen.Recording.2026-03-01.at.00.06.46.mov

Notes

  • When installing the driver on tvOS either when running a test or using studio, the driver app always opens. This was also noted by @maxphillipsdev in Add AppleTV support #2067. The currently hacky method to get around this is to inject a home press again when the driver is ready. But this also causes some delays and just doesn't feel right. The alternative would leave the simulator hanging on the driver app though until the initial - launchApp command is run. Again, a commit I am happy to drop if the latter is preferred.

For tvOS E2E testing we are initially just running against the existing settings app within the simulator. But I now also added a proper demo app using React Native tvOS + Expo based on an earlier one we had laying around over here https://github.com/plexinc/react-native-tvos/tree/request-focus-unmounted-views

Flutter is incompatible with tvOS so the existing app could not get reused.

Issues Fixed

#1515 - Adds support for testing tvOS Apps

import XCTest

extension XCUIElement {
#if !os(tvOS)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unsure if we have/want a tvOS equivalent for this function.

@DouweBos DouweBos changed the title Add tvOS Support Add Apple TV Support Feb 28, 2026
@DouweBos DouweBos force-pushed the main branch 5 times, most recently from 96e92af to 3b40e4e Compare March 17, 2026 11:05
@DouweBos DouweBos force-pushed the main branch 6 times, most recently from 8b11b05 to 46db006 Compare April 7, 2026 12:06
@DouweBos DouweBos force-pushed the main branch 3 times, most recently from 55f9a85 to 049ec4f Compare April 16, 2026 12:16
@DouweBos DouweBos changed the title Add Apple TV Support feat: add tvOS support May 19, 2026
@DouweBos DouweBos force-pushed the main branch 2 times, most recently from e5697c4 to 2c9184e Compare May 19, 2026 22:43
@jeeftor

jeeftor commented Jun 2, 2026

Copy link
Copy Markdown

Does this mean Apple TV is coming back?

@DouweBos

DouweBos commented Jun 2, 2026

Copy link
Copy Markdown
Author

@jeeftor I hope so!

@amanjeetsingh150 Is there any straightforward way to deal with these driver binary differences? Since those are essentially expected when adding tvOS support, but are also the only remaining check that is failing.

@Fishbowler Now this also has an E2E test target for tvOS (RN based since Flutter doesn't support tvOS) - is there anything left to unblock this PR?

DouweBos added 4 commits June 19, 2026 13:23
Strip the absolute build-machine prefix from SourceFilesCommonPathPrefix
entries so the committed xctestrun is reproducible across environments
and the Check Drivers Up-to-Date workflow no longer diffs on user paths.
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.

2 participants