tvOS Apprentice Updated for Swift 3 and tvOS 10

Chris Belanger

tvOS-2nd-ed-featureHappy Wednesday – it’s book release day during the iOS 10 Feast!

This Wednesday’s book release is the tvOS Apprentice, Second Edition.

The tvOS Apprentice teaches you everything you need to know to develop great apps for the Apple TV – whether you’re a seasoned iOS pro, or a web developer looking to leverage your skills to a new platform.

The book team has been working hard to bring this book fully up to date for Swift 3 and tvOS 10 — and even added some brand-new chapters in the process! More on that shortly.

This will be a free update for existing tvOS Apprentice PDF customers — our way to say “thanks” to our readers for their support!

Don’t own the tvOS Apprentice yet? Read on to see how you can get a copy!

What is the tvOS Apprentice?

The book covers both of the ways you can make tvOS apps:

  • TVML apps: The first way to make apps is via TVML and TVJS – a new markup language and programming language created specifically for tvOS apps. Web developers will rejoice, and even native iOS developers will discover this is quite powerful, and can save a lot of development time.
  • Traditional apps: The second way to make apps is the traditional approach – coding apps in Swift or Objective-C, using frameworks from iOS like UIKit, AVFoundation, StoreKit, and more. iOS developers will discover this leverages your existing expertise and code, and allows you to make a fully custom user interface.

It’s been a little under a year since we released the first edition of tvOS Apprentice, and every single chapter in this book has been updated to Swift 3 to ensure it works flawlessly with Xcode 8 and tvOS 10.

The most important update for the second edition was the upgrade from Swift 2.3 to 3, but we didn’t stop there. Apple introduced a few new APIs in tvOS 10 that we thought were critically important for anyone learning the platform. The full list of changes include:

  • A cover-to-cover update of all chapters, sample projects, and final projects to Swift 3.
  • A new chapter on PhotoKit (introduced in tvOS 10) to show great Photo Library integrations.
  • A new chapter on Multipeer Connectivity (also introduced in tvOS 10) to show how tvOS and iOS apps can better communicate with one another.
  • Inclusion of Dark Mode APIs in the UI chapters to show how your interface can better display in low light interfaces.
  • Updated all chapters to be compatible with tvOS 10, including new APIs where relevant.
  • Updated all chapters to be compatible with the Xcode 8.

This book is a whopping 27 chapters and 536 pages, covering all aspects of tvOS development from beginner to advanced. Here’s what’s inside.

Section I: Architecture

TVMLDiagram2

This section contains just one chapter, designed to give you a birds-eye view of how tvOS works and help you decide what to read next.

  1. Chapter 1, Architecture: The architecture chapter is the introduction to the technology behind Apple TV apps. This chapter will be your guide to help you decide your path through the rest of the book.

Section II: TVML Apps

22_playback

This section covers the basics for creating an app via the TVML approach. From the basics of Hello World through a real world example, by the end of this section you’ll know everything you need to create client / server apps for Apple TV.

  1. Chapter 2, Hello, TVML: Shows you how to set up a basic Hello World app using TVML and Javascript.
  2. Chapter 3, Beginning TVML: You’ll use basic TVML templates to manipulate the UI in a simple application.
  3. Chapter 4, Intermediate TVML: Building off of chapter 3, you’ll learn more complicated interfaces and templates.
  4. Chapter 5, TVJS: Start working in Javascript and learn to manipulate the TVML DOM.
  5. Chapter 6, Exploiting Native Functionality from TVML: Learn how to take advantage of native libraries and integrate them with your TVML app.

Section III: Traditional Apps

HeaderView

This section covers the basics for creating apps via the traditional approach. You’ll learn the new libraries created for Apple TV, and how the ported libraries from iOS can be used.

  1. Chapter 7, Hello, Traditional App: Learn how to set up a basic “Hello World” app using native libraries in Swift.
  2. Chapter 8, Basic Controls: Learn the basic controls your users can use to interact with your apps.
  3. Chapter 9, Stack Views: Stack Views are the backbone to the layout of your app – learn how to use them here.
  4. Chapter 10, Collection Views: See how easy it is to display a list of items in an engaging layout.
  5. Chapter 11, Navigation: Learn how to set up different forms of screen to screen navigation.
  6. Chapter 12, Focus: Apple TV uses a whole new Focus paradigm to show the user what control is currently selected – learn how this works and what it means for your apps.
  7. Chapter 13, Animation: Get ready to add some delightful animation to your tvOS apps.

Section IV: Advanced Frameworks

shuffle

This section covers some of the more advanced frameworks you’ll need for many TV app use cases. Whether you took the TVML approach or the Traditional approach, these frameworks will be important to understand to make your app stand out.

  1. Chapter 14, User Input and the Controller: Learn how your app can interact with the new Apple TV remote.
  2. Chapter 15, Beginning Video Playback: One of the most common requirements for Apple TV apps will be to play video – learn how to do that here.
  3. Chapter 16, Advanced Video Playback: Learn about some of the more advanced topics in playing videos.
  4. Chapter 17, On Demand Resources: Learn how to use Apple’s easy to use storage system, so your app can download assets on the fly.
  5. Chapter 18, Beginning CloudKit: Learn how to use CloudKit on tvOS to store your app’s data.
  6. Chapter 19, Advanced CloudKit: Go further in depth with CloudKit with user specific storage and error handling.
  7. Chapter 20, In App Purchase: Monetize your app by allowing users to purchase digital goods.
  8. (New!) Chapter 21, Photos Framework: Integrate with the user’s Photo Library and Videos.
  9. (New!) Chapter 22, Multipeer Connectivity: Enable your Apple TV to communicate with other pieces of Apple hardware.
  10. Chapter 23, Native UI in TVML Apps: Learn how to augment the TVML-to-UIKit engine to create custom resources, TVML tags, and styling properties.

Section V: Design

layersMixup

This chapter covers new design concepts introduced in tvOS. For your app to stand apart from the rest, you’ll need to understand these new design concepts well.

  1. Chapter 24, tvOS Design: Learn how to design your apps to fit in well with the tvOS ecosystem.
  2. Chapter 25, Creating Layered Images: Shows how to create a new kind of image specifically for the TV.
  3. Chapter 26, The Top Shelf: The Top Shelf is a new design concept that allows your app to show off specific content – learn how to use this in your apps.

Bonus Chapter

And that’s not all – on top of the above, we have a bonus chapter for you!

  1. Chapter 27, Javascript Crash Course: Developing TVML apps for tvOS requires some Javascript knowledge. If you’re new to Javascript, check here for a quick crash course.

About the Authors

Of course, our book would be nothing without our team of experienced and dedicated authors:

ChristineAChristine Abernathy is a Developer Advocate on the Open Source team at Facebook, with previous Developer Advocacy roles with Parse and Facebook Platform. Christine has a passion for developers and mobile technologies. Prior to Facebook, Christine headed up engineering at Mshift, a mobile banking software provider, delivering Android, iOS and mobile browser-based products.

JerryBJerry Beers is an author of this book. Jerry is co-founder of Five Pack Creative, a mobile development company specializing in iOS, Apple Watch, and tvOS development. He is passionate about creating well-crafted code and teaching others, recently partnering with RayWenderlich.com to launch Alt-U, a developer training program focused on preparing students to become rock star iOS developers! You can find out more at http://www.fivepackcreative.com/.

EricCEric Cerney is an author of this book. Eric is an iOS Software Engineer in San Francisco. After being acquired by Capital One, he likes to spend his days at work hanging out with Samuel L. Jackson and asking everyone “What’s in your wallet?”. Lately, his main focuses have been on Swift, gaining a deeper knowledge of programming languages at the core, and of course, the Apple TV. You can find him hiding in the shadows on Twitter at @ecerney.

SamDSam Davies is an author of this book. Sam is a strange mashup of developer, writer and trainer. By day you’ll find him recording videos for Razeware, writing tutorials, attending conferences and generally being a good guy. By night he’s likely to be out entertaining people, armed with his trombone and killer dance moves. He’d like it very much if you were to say “hi” to him on Twitter at @iwantmyrealname

EvanDEvan Dekhayser is an author of this book. Evan is a 17 year old developer who hopes to continue learning and improving while helping others take their first steps into coding. If he is not programming, he is at school or playing baseball. You can find him on Twitter at @ERDekhayser.

JoshGJoshua Greene is an author of this book. Joshua is a passionate iOS developer who loves creating elegant apps. When he’s not slinging code, he enjoys martial arts, Netflix, and spending time with his wonderful wife and daughter. You can reach him on Twitter at @jrg_developer.

MichaelKMichael Katz is an author of this book. Michael envisions a world where mobile apps always work, respect users’ privacy, and integrate well with their users’ life. When not coding, he can be found with his family playing board games, brewing, gardening, and watching the Yankees.

KelvinLKelvin Lau is an author of this book. Kelvin is a physicist turned Swift iOS Developer. While he’s currently entrenched with iOS development, he often reminisces of his aspirations to be part of the efforts in space exploration. Outside of programming work, he’s an aspiring entrepreneur and musician.

JulienMJulien Martin is an author and designer of this book. After years working in print, Julien discovered an unquenchable passion for icon and interface design while working with startups in New York City. Back home in France, he has since designed multiple successful and award-winning mobile apps for established businesses, entrepreneurs and passionate individuals who value the importance of great design and expertise in that matter. You can get in touch via http://julien.design.

MikeOMike Oliver is an author and final pass editor of this book. He has been a mobile junkie every since his first “Hello World” on a spinach-screened Blackberry. Lately, he works primarily with iOS, but he’s always looking for new ways to push the envelope from your pocket. Mike is currently the VP of Product Engineering at RunKeeper, where he leads and empowers an incredible team of software engineers. He can be found on Twitter at @moliver816.

Free tvOS Chapters this Week

To help celebrate the launch, we’re going to open up the book and share three free chapters with you this week! This will give you a chance to check out the book — we’re confident you’ll love it! :]

Where To Go From Here?

The tvOS Apprentice, Second Edition is now 100% complete, fully updated for Swift 3 and tvOS 10 and available today.

  • If you’ve already bought the tvOS Apprentice PDF, you can download the new book immediately on your My Loot page.
  • If you don’t have the tvOS Apprentice yet, you can grab your own copy in our store.

You can get 10% off on this book — or anything else in our store — with the code IOS10FEAST.

Speaking of which, be sure to check out everything we’re offering this year in the iOS 10 Feast, including $40,000 in giveaways!

To enter, simply retweet this post with the #ios10feast hashtag using the button below:


We hope you enjoy this massive free update, and stay tuned for more book releases and updates coming soon!

Chris Belanger

Chris Belanger is the Book Team Lead and Lead Editor for raywenderlich.com. If there are words to wrangle or a paragraph to ponder, he‘s on the case.

In the programming world, Chris has over 20 years of experience with multiple database platforms, real-time industrial control systems, and enterprise healthcare information systems.

When he kicks back, you can usually find Chris with guitar in hand, looking for the nearest beach, or exploring the lakes and rivers in his part of the world in a canoe.

Other Items of Interest

Big Book SaleAll raywenderlich.com iOS 11 books on sale for a limited time!

raywenderlich.com Weekly

Sign up to receive the latest tutorials from raywenderlich.com each week, and receive a free epic-length tutorial as a bonus!

Advertise with Us!

PragmaConf 2016 Come check out Alt U

Our Books

Our Team

Video Team

... 19 total!

iOS Team

... 73 total!

Android Team

... 20 total!

Unity Team

... 11 total!

Articles Team

... 15 total!

Resident Authors Team

... 18 total!

Podcast Team

... 7 total!

Recruitment Team

... 9 total!