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

Looking for more like this?

Sign up for our monthly newsletter to receive helpful articles, case studies, and stories from our team.

Make Your Website Shine Through Shareable Meta tags
Development Web

Make Your Website Shine Through Shareable Meta tags

June 20, 2023

Improve the web site preview used by chat apps, websites, and social media with these easy tips.

Read more
Three principles for creating user-friendly products
Business Design

Three principles for creating user-friendly products

January 25, 2023

Grayson discusses three guiding principles he utilizes when designing user experiences for products.

Read more
Quickly Prototyping a Ktor HTTP API
Development Web

Quickly Prototyping a Ktor HTTP API

August 18, 2022

Whether it’s needing a quick REST API for a personal project, or quickly prototyping a mockup for a client, I like to look for web server frameworks that help me get up and running with minimal configuration and are easy to use. I recently converted a personal project’s API from an Express web server to a Ktor web server and it felt like a breeze. I’ll share below an example of what I found and how easy it is to get a Ktor server up and running.

Read more
View more articles