The Plex App Uses TVML For Its (Pretty) UI


We had some tough choices to make. The new platform allowed for two very different ways to build apps, each with distinct advantages and disadvantages. The easiest was TVML, which is a custom markup language evolved from the earlier version present on previous generations of the device. TVML is a markup language for media interfaces, meaning that it’s incredibly easy to make the beautiful screens you’re accustomed to seeing in the Apple apps. On the other hand, they allowed running full native code, which was obviously essential for games, and provided the highest level of control.

We timeboxed two days of prototyping using both technologies, and quickly realized that a beautiful native-looking UI build with the native SDK would take much longer than using TVML. On the other hand, the limitations around the TVML media players led us to want to use our native code from the iOS app.

TVML uses the same behaviours and appearance characteristics as the stock Apple TV apps, which is great. The downside is that they are less customisable and slower than what a truly native app would be, as every TVML app is backed by a JavaScript application layer.

‘Native’ tvOS apps are way faster and more flexible in what features and functionality you can do, but you don’t get access to a standard TV UI library. Native developers have to reimplement all of the OS-level behaviour themselves, if they want to replicate this which is a lot of redundant work.

This may be a very developer-minded request but what I want Apple to do is add a TVUIKit library to the native app side. This would include things like the system autoscrolling labels and smart headers in collection views. They would effectively be stylised UIKit controls, which don’t really fit in the core cross-device UIKit component library, but are used across tvOS apps. Then, developers don’t have to painstakingly recreate behaviours that you get free with TVML whilst also having the speed and utility benefits of native apps.