Automating Apple TV with iOS Gateway

You can use iOS Gateway to automate Apple TV (4th generation). Apple TV 4k (5th generation) is not supported, as the device lacks a USB port.

Note that when you connect to an Apple TV using iOS Gateway, images for installed apps don't display in the App List.

Get a tvOS Provisioning Profile

To automate Apple TV, you must create a tvOS provisioning profile on the Apple developer portal.

Controlling Apple TV

Normal operation of Apple TV involves the use of a remote control or a mobile app to interact with the UI and installed apps. When automating Apple TV in Eggplant Functional using iOS Gateway, you use the following keywords with the SenseTalk TypeText command to replicate a quick push of the buttons on the remote:

Remote Button TypeText Keyword Action
Left leftArrow Moves the on-screen selection one item to the left.
Right rightArrow Moves the on-screen selection one item to the right.
Up upArrow Moves the on-screen selection one item up.
Down downArrow Moves the on-screen selection one item down.
Menu menuButton Presses the Menu button. This functions mainly as the Back button, but can have other app-specific uses.
Select selectButton Presses the selected item.
Home homeButton Presses the Home button. This is configurable in Apple TV preferences, home screen, or Watch TV app.
Play/Pause playButton Presses the Play/Pause button.

You can also use the SwipeLeft, SwipeRight, SwipeUp, and SwipeDown commands to replicate pushing the directional arrows on the Apple TV remote control.

Note:Apple TV does not support the use of coordinates in commands. Swipe commands sent to Apple TV use the general direction of the swipe to determine which way to swipe, rather than any specific coordinates you provide with those commands—those coordinates are ignored. We recommend using the TypeText command with Apple TV for greater precision and control.

The killApp and launchApp commands also work with tvOS.

 

This topic was last updated on August 19, 2021, at 03:30:51 PM.

Eggplant icon Eggplantsoftware.com | Documentation Home | User Forums | Support | Copyright © 2022 Eggplant