Development iOS

Creating your first Apple TV App

August 1, 2017

With the success of Apple TV, there has never been a better time to get your content on television screens of viewers all over the world. Although the initial task might seem daunting, Apple’s Television Markup Language (TVML) can get your project up and running in a hurry. Very briefly, building an app for tvOS with TVML means creating a client (on the device) and a server that hosts the content similar to a standard webpage. This means that a TVML solution is quite friendly for developers with web development experience as most projects will require very minimal native tvOS development.

Wait, no native programming?

Depending on your point of view, the idea of non-native code may make you squeamish or very excited. If you are getting ready to run the other way, first consider this. Most video applications have the same general layout, and Apple provides templates that will help your app go from zero to hero in no time flat. These templates allow you to rapidly progress from nothing to a full-fledged app with just JavaScript (no 3rd party libraries required!). So how does this work? First, let’s go over some terminology.

  • TVML - (Television Markup Language) an XML-based language similar to HTML that defines the visual display
  • TVJS - APIs for your JavaScript application used to interact with the Apple TV device
  • TVMLKit - The framework allowing you to incorporate JavaScript and TVML in your binary apps

Using these tools, a “standard” tvOS app for displaying video content is already partially completed. Apple’s predefined templates provide you with a headstart that is not available with pure native development. So even if your end-goal is a native app, TVML is a great option for quick prototyping.

Simple building blocks

So what are these templates? Templates are well-defined blueprints that provide your app with the standard look and feel of the Apple Tv while still remaining quite configurable. To get a better understanding of what these templates can provide, imagine (or open in another window) your favorite video streaming service. Think about its layout and how you expect clicking within the application to react. Now, compare these concepts/layouts with the structures in these examples.

Chances are good that at least one of the examples above closely resembles what you were envisioning. The truth is, there are only so many ways to conveniently display a list and even fewer to display a fullscreen video! For reference, the examples above were the Catalog Template,, the Stack Template, and the Product Template.

Friendly for web developers

According to the Stack Overflow Developer Survey in 2017, JavaScript remains the most popular programming language for the fifth year in a row. This means that at least one member of your development team already has the knowledge required to get started even if they have never worked with iOS. Again, how? For starters, the entire application may be built within their favorite JavaScript editor, and completely separated from any native code. In fact, in a basic app, the only native code that needs to be written is the configuration of the JavaScription application URL!

When is TVML not a great match?

Although TVML can be very helpful in common situations, it may not be the solution for your next project. If in the exercise above your app didn’t match up with the templates, you are probably a good candidate for going native. Although before you do, I highly recommend investigating some of the other templates available. Whereas TVML may provide a quick and dirty way to get a generic app up and running, applications that require intricate design features or interesting functionality will likely benefit from developing natively. By providing most of the iOS SDK, native development provides you with more control over functionality and appearance. Not only does this allow for fancy animations, but it also feels quite familiar to iOS developers too. And, developing in xCode means auto-complete and standard integration with your commonly used libraries.

Go out and get started!

Chances are if you have gotten this far, you are considering making an application of your own. Don’t hesitate, get started! For more information and documentation, head over to the Apple Developer docs and browse through their examples and templates. If you prefer an example project to start from, check out a Sample Project I created to get started. Or, consider contacting us for more information on having us bring your app to life.

Scott Schmitz
Scott Schmitz
Software Developer

Stay in the loop with our latest content!

Select the topics you’re interested to receive our new relevant content in your inbox. Don’t worry, we won’t spam you.

Drinks on the Deck 2022

Drinks on the Deck 2022

July 19, 2022

Join us and ~250 other friends for Drinks on the Deck 2022. Come help us celebrate the new office in Ada. Free drinks & appetizers.

Read more
Iulia Rontu to join leadership team at MichiganLabs

Iulia Rontu to join leadership team at MichiganLabs

February 4, 2021

Iulia will be joining the leadership team at MichiganLabs effective Monday, February 8, 2021. Iulia has been with MichiganLabs for 2 years in May of this year. She is currently the UX Practice Lead where she helps define our user experience practice to help transform and delight our clients.

Read more
Building Better App UI Architecture- Android Themes

Building Better App UI Architecture- Android Themes

January 13, 2020

In the last post, we discussed how do we optimize the UI system implementation by breaking down the design into smaller pieces, identifying the UI elements and components and using protocol-oriented programming in iOS.

Read more
View more articles