Three Weeks of AppleTV

Playing around with my latest toy.

Darryl Bayliss
, in 27 November 2015

I snagged an AppleTV this month woohoo! Something I’ve wanted to get my hands on for a number of years but delayed until it did something worth my time and money.

Television Consumption

Now that little box has spent a few weeks sitting underneath my TV I’ve spent a lot of time getting used to how it works. Playing Mr Crab and Crossy Road (thanks cross-platform purchases), watching Netflix and using Airplay with my iPhone and MacBook.

It’s a nice experience that wraps up my little Apple world. I’m not sure what its like to start with a fresh pair of eyes to Apple hardware but I feel you definitely need to be plugged into the Apple ecosystem to get some immediate joy out of the box.

The main feature of the latest Apple TV is the inclusion of an App Store, which at the moment is refreshingly light on the content side. Perhaps thats an incorrect observation, discoverability is a problem at the moment and hot topic across the net here, mentioned again here and a slight improvement mentioned here)

I am sure this will improve with time, as a developer I think its nice to to see that even a technology giant like Apple has to start small and build upon a foundation. Something that is easy to forget considering the pressures it will no doubt have because of its past success with the iPhone and iPad.

Television Production

In the run up to the release of Apple TV, I joked that I was going to make a crackling fireplace app for the store just for Christmas. The irony I felt when I was searching the top paid apps on the store to see quite a few standing proud!

My little joke suddenly turned into a matter of pride and so I immediately set out to do what any good developer does. See how easy it is to build the thing!

The results are in and its very promising: Any iOS developer who feels comfortable throwing a few screens together will feel comfortable creating a tvOS app. Storyboards do as you expect, MVC is still alive and kicking and a lot of your favourite Apple frameworks work unmodified.

What’s curious to note is that MapKit and WebViews have been unceremoniously cut from tvOS. When you think about it for a moment it makes sense, any user experience I’ve had with Web Browsers on Smart TV’s and game consoles have left me scrambling for a laptop. I bet others feel the same.

On the other hand I’ve never had the chance to use a map on a TV so I couldn’t be sure I’d feel the same way about them as Web Browsers. Whats even more confusing is that tvOS has builtin location services that allows developers to work out where users are based.

I’m guessing Apple made the call that users won’t find a map useful enough on their televisions and prefer it to remain on their phones to give them directions. They maybe right but I feel they could be missing out on some multi-device experiences here. My MacBook can use its Maps application to send map directions to my iPhone, why can’t my tv?

Remaining Focused

One of the major breakaways from iOS Development is getting used to the fact that your app is controlled from a remote rather than touch. Fortunately Apple has done a superb job at making this switchover fairly painless thanks to their inbuilt Focus Engine

Focus is tvOS’s way of showing a user what UI can be interacted with onscreen as they swipe about using the remote. Buttons for instance is enlarged when a user swipes across the screen to it whilst a TableView will highlight the next item in the table.

What is really magical about the focus engine is it’s aware of all UI components available on a screen and intelligently works out what is the most logical UI component to shift focus to.

Lets say you have a table onscreen with 20 items, a button above it and you currently are focusing on item 20 in that table. As you begin to scroll up the table it will intuitively scroll through all items in the table first until it focus is on the first item. If you try to scroll up again the focus engine knows there is no items left to focus and instead focuses the button.

It’s a really in-depth topic and one worth learning about if your serious about developing for Apple TV. Apple have an entire section dedicated to controlling the UI here

App Structure

So what does my app consist of? I’ve kept it simple and stuck to Swift and utilising local content. Local content may sound like a strange concept to worry about and for the most part it is.

That’s because Apple has decided to impose a strict policy on storing data and resources on its hardware, Apps stored on AppleTV can only be 200MB in size. Any larger and your app needs to break it’s content into downloadable on-demand assets that can be purged by the OS at anytime.

This benefits the user because they get to quickly download an app and experience what it can offers without downloading every single part. It also means assets that haven’t been used for a while can be purged to reclaim disk space if needed.

Any data developers may want to keep around are recommended to be saved in iCloud, I’m guessing this is a strategy in the making for Apple as they continue to push cross platform purchases and to ensure developers can easily transfer information across devices without heartache.

I’ve not delved into the finer details of using On-Demand Resources or the stranger case of creating a client server app utilising something called TVML (Television Markup Language) and JavaScript. More on that here. To me it feels a little overkill for most developers unless you have a large amount of content you want to funnel into your app.

Final Thoughts

I’m still playing around with tvOS and learning something new everyday. It’s good to be able to see something I’ve made come alive on the TV in front of me, it also makes me wish other machines I have like the PS4 could provide this kind of developer experience.

I am sure it could if the infrastructure was there, but it could be too late now. Only time will tell.