Last year, Apple introduced tvOS, a great new platform to develop for, but this new platform presents some interesting scenarios when developers need to test on an actual Apple TV. For most developers, the TV is across the room, and while you could get a really long USB type C cable to debug your apps in Xcode, sometimes that’s just not practical every time you need to do some debugging on your apps.
For those times when developers need to quickly Build and Run an Apple TV app, Xcode will open the compiled app inside of the tvOS simulator, which works identically to the iOS simulator that has been around since the dawn of time*.
Navigating around the tvOS simulator makes use of the arrow keys and return key on your keyboard; however, this method of navigation won’t let you preview the lovely perspective shifting artwork in your apps.
Fortunately, Apple has devised a way to connect up your Bluetooth Siri Remote to your Mac, and get the navigational features available on Apple TV hardware directly inside of the tvOS simulator.
To connect a Siri Remote to your Mac, follow these steps:
- Press the Menu and Volume + button on the remote simultaneously for a few seconds to unpair the remote from any paired devices.
- On your development Mac, Open System Preferences | Bluetooth
- Click the trackpad area of the Siri Remote to awaken the device
- Under the Discovered section of the Bluetooth Preferences pane, there will be a Pair button beside of an awkwardly named Bluetooth device. Click this pair button, then wait a few seconds.
- When the remote has been paired successfully, it will have text below the name stating “Connected.”
Now that you’ve successfully paired the remote, the next time you wish to debug your apps in the tvOS simulator, you can use the remote to navigate around the simulator using the trackpad swipes, and Menu, Home, and Play/Pause button presses.
You will notice that when running the tvOS simulator with a connected Siri Remote, the swipes and gestures may be delayed and not quite as fluid as when connected directly to Apple TV hardware; however, it does make it easier to debug your apps without getting carpet burn while sitting in front of your TV in the living room.
This functionality is available on OS X El Capitan, and Xcode (with Sim) version 7.1 beta 2 and higher.
- OK, maybe it hasn’t been around since the dawn of time, but 8 years old is pretty old in computer time.
MartianCraft believes in software as a positive change for the human experience. Their proven approach to software — a deep focus on the customer — advances the state of the art for clients. What can MartianCraft do for you?