tvOS SDK: An iOS Developer’s Initial Impressions
Check out what an iOS developer thinks of Apple’s newly released tvOS SDK – including details on development tools, TVML, the touch engine, and more! By Chris Wagner.
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress, bookmark, personalise your learner profile and more!
Create accountAlready a member of Kodeco? Sign in
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress, bookmark, personalise your learner profile and more!
Create accountAlready a member of Kodeco? Sign in
Contents
tvOS SDK: An iOS Developer’s Initial Impressions
20 mins
In one of the final chapters of “Steve Jobs” by Walter Isaacson — Steve was quoted saying “It will have the simplest user interface you could imagine. I finally cracked it.” He was, of course, referring to Apple TV.
It wasn’t long after that Steve unfortunately passed away, and since then many of us have been eagerly anticipating this product. Yesterday on September 9th, 2015 — more than four years later — we were finally presented with what may possibly be Steve’s vision, or perhaps just the beginning of it.
Yesterday’s announcement was super-exciting for us as iOS developers, because Apple announced that the new Apple TV will have an App Store that we can develop apps for – leveraging much of our existing iOS knowledge and opening many new opportunities.
I and the rest of the Tutorial Team have been digging into the tvOS SDK and are already hard at work preparing some tutorials on tvOS (stay tuned!), but to tide you over in the meantime, I wanted to share my initial impressions of tvOS from an iOS developer’s perspective.
Let’s dig in!
The Basics
The original Apple TV was a set-top box that provides users with a simplistic user interface designed primarily for navigating and viewing video content. The new Apple TV announced yesterday expands this to full-blown apps for things like shopping and even games.
Let’s took a look at the critical info:
- Hardware specs: Notable specs are 64-bit A8 processor, 32GB or 64GB of storage, 2GB of RAM, 1080p resolution, HDMI, and a new Siri Remote / Apple TV Remote (more on this later).
- Price: The new Apple TV is priced at $149 and $199 for 32GB and 64GB models, respectively. This came as a surprise to many, as they had been expecting to see higher price points.
- Release date: Apple has given a vague release timeline of “Late October” but provided developers access to the tvOS SDK immediately. This isn’t much time to prepare, so if you want to have something ready for tvOS launch I suggest you move fast!
- Development hardware: Apple has announced a program that allows “proven” developers to request an Apple TV Developer Kit, which is an early access Apple TV to use for testing. From the sounds of it you’ll be lucky to receive one; but if you’re serious about trying to hit launch date it’s worth a shot.
Developing Apps
By this point, it should be obvious that developing apps for the new Apple TV is a thing, and it’s a great thing!
When developing for Apple TV you will be developing for tvOS — the name coined by Apple as the device’s operating system. tvOS is built upon iOS and lends many of the same frameworks that you may already be familiar with.
In order to develop for tvOS you will need to download Xcode 7.1 from the developer center. This is a beta version of Xcode that includes support for tvOS, and a tvOS Simulator. You can install the Xcode 7.1 beta alongside Xcode 7 GM if needed.
Apple has provided two methods of developing apps on tvOS:
- TVML Apps: The first uses an entirely new process utilizing TVML, TVJS and TVMLKit. This was a big surprise to many of us – we’ll dive into this further in a moment.
- Custom Apps: The second uses familiar iOS frameworks and concepts you know and love like Storyboards, UIKit, and Auto Layout.
When you develop an Apple TV app, it will be a separate target which implies that tvOS apps would be a separate purchase for customers. However, in the keynote Apple said there would be support for “universal purchases” where customers could purchase an iOS and tvOS app for a single price. We’re not quite sure of the exact details of linking the apps but an Apple engineer has stated the following in the developer forums.
“No, the apps do not need to be submitted at the same time. The apps for each platform can remain totally distinct – have different versions, be updated at different times, etc. (For example, you could link an app that’s already in the iOS App Store to a new tvOS app when its App Store goes live)”
TVML Apps
As mentioned, the first method of making apps is via TVML, TVJS, and TVMLKit. If these abbreviations sound foreign to you, don’t fret because they should. Here’s what they are:
- TVML is a form of XML and stands for “Television Markup Language”.
- TVJS is set of JavaScript APIs which provide you with the means to display apps created with TVML.
- TVMLKit is the glue between TVML, JavaScript, and your native tvOS application.
If you’re a native iOS developer the thought of these might make you wince a little bit. But keep an open mind, there is some great power to all of this.
Here’s a very typical use-case for apps on Apple TV. Consider the following: you have content on a server and you want to display that content to users. Your content is organized in a predictable manner and navigating it should be intuitive and familiar. You want your tvOS app to feel at home with other apps. You’re not interested in pushing the envelope on cutting edge user experiences and designs.
If this sounds like you and your app’s requirements, you may want to consider TVMLKit. Apple has put a lot of work into providing reusable templates that will be familiar to the user, there are in fact 18 of them as of this writing. Many of them allow you to create stunning interfaces that feel right at home on the user’s television. You can browse the templates in the Apple TV Markup Language Reference which I would highly recommend.
I also recommend running the TVML Catalog sample app to view each template in action in the tvOS simulator. Be sure to check out the README.md
file as you’ll be required to start a local web server to host the content for the app to access. Don’t worry, it’s a single terminal command.
There is truly a ton of content to cover on this topic and it is very much worth your while to consider TVMLKit as an option for building your app. At this point in time I would recommend it to be the first point of consideration for apps that primarily provide menus of content. However, if you’re aiming to provide a fully immersive experience in your app, where your users will be spending more time interacting with your interface than passively watching or listening to content, then it is time to move on to developing a fully custom app.