Hands-on with the New AppleTV and Writing a tvOS App
Following their event and AppleTV announcement, Apple offered developer kits to app developers. For whatever reason, I was fortunate enough to be selected. My AppleTV Developer Kit arrived this past Friday.
We are a 1 TV family and everyone runs away when I mention “Apple beta software” so to avoid trouble I picked up a 24" Samsung TV from Costco.
Initial Thoughts on the AppleTV
- Developer kit included the AppleTV, remote, a lightning cable, and another (USB C?) cable
- Had to download and install the tvOS beta via iTunes
- The only apps installed are the standard Apple ones (Movies, TV Shows, Music, Computer, Settings)
- Setup was easy and our movie library was available after signing in
- The remote is nice. It’s smaller than I anticipated but the touch area seems to be big enough for navigating the TV. Time will tell, but it feels too small for gaming (granted, I’m not a big gamer).
- The kids picked up on how to use the remote right away
- Siri on the remote seemed a little buggy. When I asked her to “Show me [famous actor] movies” it worked 90% of the time. However, the order of results is odd–definitely not by popularity.
- Siri doesn’t respond to you with a voice which surprised me.
Building a tvOS App
After messing around with the AppleTV and remote, it was time to download XCode 7.1 beta and build an app.
I’ll write an in-depth article and/or tutorial on this but the process was pretty smooth and would be familiar to any iOS developer.
I was able to build a very simple, single-view application in Swift in about an hour. tvOS apps have a few unique things like special buttons (which actually work really nice out of the box).
I grabbed an image from Pexels, threw it in a UIImageView and added some layout constraints. Then I added 3 UIButtons and a UILabel. A few lines of Swift code later and the kids were doing math drills with the AppleTV remote.
You can get the code for Math Dog on GitHub here. It requires XCode 7.1 beta to run.
A Note on App Icons
AppleTV and tvOS icons are interesting. Beyond having new size requirements, the icons are actually layered in your Assets.xcassets folder. AppleTV does some interesting parallax animations as you hover over them with the remote.
Is the new AppleTV cool? Yes. Will Apple sell a ton of them and create a lucrative app ecosystem for developers? I hope so but I’m not sure.