There are 2 ways of developing apps for Apple TV. They are known as Native and TVML. Native is quite straight forward and works pretty much the same as an iOS app with all of its native components and lifecycle methods. TVML is a client-server based. Views are built using predefined templates by Apple or using the markup language provided (TVML).
It's possible to reuse almost the entire SDK with a few remarks:
- There's no WebView. Therefore, we can only leverage the native message. Since we do not yet support a native PM, we're only able to support 1st layer messaging.
- The code will need a bit of a refactoring. Since a big chunk of the SDK relies on the existence of the
WebKit
module, we'll need to conditionally load code for different platforms (iOS
ortvOS
).
After applying the changes to make the SDK reusable on tvOS (described above) we are able to support TVML as well. With the same caveats as the native approach, no webview, no external browser.
With medium effort we'll be able to support AppleTV but only the 1st layer message at this time since the PM is not yet "Nativeable".