theopak / tvOSBrowser

tvOS Web Browser sample project (Private API)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tvOS Browser

Web browser for tvOS using private API (aka UIWebView).

To build successfully, you'll need to change 2 lines in Availability.h starting around line 280:

  • Availability.h for the AppleTV: /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/usr/include/Availability.h
  • Availability.h for the AppleTV Simulator: /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk/usr/include/Availability.h Change:
/* for use marking APIs available info for tvOS */
#if defined(__has_feature)
  #if __has_feature(attribute_availability_tvos)
-   #define __TVOS_UNAVAILABLE                    __OS_AVAILABILITY(tvos,unavailable)
-   #define __TVOS_PROHIBITED                     __OS_AVAILABILITY(tvos,unavailable)
+   #define __TVOS_UNAVAILABLE_NOTQUITE           __OS_AVAILABILITY(tvos,unavailable) /* changed for https://github.com/jvanakker/tvOSBrowser */
+   #define __TVOS_PROHIBITED_NOTQUITE            __OS_AVAILABILITY(tvos,unavailable) /* changed for https://github.com/jvanakker/tvOSBrowser */
    #define __TVOS_AVAILABLE(_vers)               __OS_AVAILABILITY(tvos,introduced=_vers)
    #define __TVOS_DEPRECATED(_start, _dep, _msg) __TVOS_AVAILABLE(_start) __OS_AVAILABILITY_MSG(tvos,deprecated=_dep,_msg)
  #endif
#endif

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

How to Use tvOSBrowser

  • 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.

About

tvOS Web Browser sample project (Private API)


Languages

Language:Objective-C 100.0%