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.
The killApp and launchApp commands also work with tvOS.