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.

The 5 Minute Accessibility Strategy
Android Development iOS

The 5 Minute Accessibility Strategy

May 18, 2023

We discuss how you can make a plan in just 5 minutes to provide accessibility in your mobile app.

Read more
Web app vs. mobile app: How to decide which is best for your business
Business Development

Web app vs. mobile app: How to decide which is best for your business

March 26, 2024

When considering whether to develop a web app or a mobile app for your business, there’s honestly no definitive answer. But this article will help you make an informed decision that aligns with your business goals and sets you up for success.

Read more
5 takeaways from the Do iOS conference that will benefit our clients
iOS

5 takeaways from the Do iOS conference that will benefit our clients

November 30, 2023

Read more
View more articles