Tips & Tricks

How to install tvOS Browser on your Apple TV

tvOS Browser allows you to browse the internet on your Apple TV.

To install tvOS Browser on your Apple TV you’ll need an Apple Developer account (which is free), Xcode and a USB-C cable or an adapter. If that doesn’t sound like you it probably won’t be worth you reading any further.

  1. We’ll assume you have a developer account. If not you need to set one up here developer.apple.com/account.
  2. Download Xcode from the Mac App Store.
  3. Get a USB-A to USB-C cable.
  4. Download the source code to tvOS Browser using Xcode (you can get it from here https://github.com/steventroughtonsmith/tvOSBrowser)
  5. This is where it all gets a little complicated. You have to remove some code in order to get the tvOS Browser to work.

Web browser for tvOS using private API (aka UIWebView). You’ll need to redefine the following in Availability.h to build successfully.

Availability.h for the AppleTV is located in Xcode>Contents>Developer>Platforms>AppleTVOS.platform>Developer>SDKs>AppleTVOS.sdk>usr>include Availability.h for the AppleTV Simulator is located in Xcode>Contents>Developer>Platforms>AppleTVSimulator.platform>Developer>SDKs>AppleTVSimulator.sdk>usr>include

Change:

#define __TVOS_UNAVAILABLE __OS_AVAILABILITY(tvos,unavailable) #define __TVOS_PROHIBITED __OS_AVAILABILITY(tvos,unavailable)

To:

#define __TVOS_UNAVAILABLE_NOTQUITE __OS_AVAILABILITY(tvos,unavailable) #define __TVOS_PROHIBITED_NOTQUITE __OS_AVAILABILITY(tvos,unavailable)

Do this for Availability.h for both simulator and device if you want to run it on the real hardware.

How to Use tvOS Browser

  • Double press on the center of the touch area of the Apple TV Remote to switch between cursor & scroll mode.
  • Press the touch area while in cursor mode to click.
  • Menu will navigate back (like a back button).
  • Pressing the Play/Pause button will let you input URLs, search Google, and reload the page.
  • Double tapping the Play/Pause button or Menu button displays a menu with Favorites, History, set/open homepage, change user agent, clear cache, and clear cookies.

Github tutorial.

Tags