Skip to main content

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 ButtonTypeText KeywordAction
LeftleftArrowMoves the on-screen selection one item to the left.
RightrightArrowMoves the on-screen selection one item to the right.
UpupArrowMoves the on-screen selection one item up.
DowndownArrowMoves the on-screen selection one item down.
MenumenuButtonPresses the Menu button. This functions mainly as the Back button, but can have other app-specific uses.
SelectselectButtonPresses the selected item.
HomehomeButtonPresses the Home button. This is configurable in Apple TV preferences, home screen, or Watch TV app.
Play/PauseplayButtonPresses 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.