We can finally make apps for the tv! Personally, I have been hoping for this for over 2 years. I'm so excited that it's here. I have created a 47-minute tutorial packed with walkthrough of all the cool new stuff. What's covered?
- Making your first tvOS app
- Top Shelf API
- Tap and Pan gestures on the new remote
- Parallax Previewer
- UIKit on tvOS
- TVML and server based apps
Play the YouTube video and start making tvOS apps!
A Word of Caution...
This tutorial assumes you have some knowledge of iOS programming. If you don't, please check out my iOS programming class. It's the class I wish I had when I was first learning how to make apps. Go to iOS9class.com to enroll. Use coupon code tvos to get over 75% off.
Making your first tvOS app
To make tvOS apps you need Xcode 7.1 or higher. You can get Xcode here. Once you have Xcode open, create a new project. On the left side of the screen, select Application under tvOS. Then select Single View Application and hit next.
Choose a place to save your project. Once you have that. Hit the play button and let's see what an empty tvOS app looks like. If the simulator window is too big, go to the simulator's top menu and select Window -> Scale and then choose something like 50% so it becomes more manageable on your screen. You'll also want to get the Apple TV remote to show up by going to Hardware -> Show Apple TV Remote in the top menu.
You'll find that the rest of the process is SUPER similar to doing iOS apps. I'd recommend going to the storyboard and grabbing a ton of stuff and throwing it on the view controller to try out. Note that these view controllers are huge and if you're using a laptop like I am, you're gonna have to do a lot of zoom in, zoom out, and scrolling. If this is your computer, you're gonna have no issues ;)
For navigating around your app, use the arrows on your keyboard.Your return/enter key acts as the selection button too. As you use the arrows, you'll notice that there's a glow that will move behind whatever thing you are currently selected on. This is the focus. There's tons of good information about this in Apple's documentation here.
Top Shelf API
Top shelf is a way for you to show of some images of content in your app. Users can select 5 apps to be at the top of their home screen. If your app makes it to the coveted top 5, then when the user is "focused" on your app, it will display images of your content at the top of the screen.