O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Developing for Apple TV using tvOS and Swift

Book Description

Gary Bennett, Brad Lees, and Stefan Kaczmarek, the team behind Swift 2 for Absolute Beginners, brings you a hands-on "Swift" introduction to the new tvOS SDK with a collection of app projects to try out.

You’ll learn how to create a BookStore app for the TV, including using Stack Views for book details, how to create a photo gallery app, and how to use collection view and split view controllers with a music collection app. Finally, you’ll also learn how to store Apple TV app data in iCloud.

The new Apple TV is here, and it’s open for your native apps — Developing for the Apple TV with tvOS and Swift will get you started developing right away.

Table of Contents

  1. Cover
  2. Title
  3. Copyright
  4. Dedication
  5. Contents at a Glance
  6. Contents
  7. About the Authors
  8. Acknowledgments
  9. Introduction
  10. Chapter 1 : Getting Started with the New Apple TV
    1. Lots of Good News
      1. Capabilities
      2. The Siri Remote
      3. Apple TV’s Limitations
      4. Advantages with tvOS Development
      5. Some Notes About Developing in Swift with tvOS
    2. The tvOS Focus Engine
      1. What Does Focusable Mean?
    3. Summary
    4. Exercises
  11. Chapter 2 : The tvOS Weather App
    1. Designing the View
      1. Adding the Code for the View
    2. Summary
    3. Exercises
  12. Chapter 3 : Stack Views and the Focus Engine
    1. Auto Layout and Stack Views
      1. Implementing Stacks
    2. The Focus Engine
      1. A Focus Engine Example
    3. Summary
    4. Exercises
  13. Chapter 4 : Creating a Photo Gallery App
    1. Page View Controllers
    2. Creating the Photo Gallery App
    3. A Little Project Cleanup
    4. Adding the Page View Controller
    5. Adding Scenes to the Interface Builder Canvas
    6. Adding the Photo and Album Data Model Structures
    7. Adding the Photo Image Files to the Asset Catalog
    8. Completing the Photo Gallery App
    9. Summary
    10. Exercises
  14. Chapter 5 : Adding an Album Browser to the Photo Gallery App
    1. Table View Controllers
    2. Adding a Table View Controller to the Photo Gallery App
    3. Adding the Gallery Data Model Structure
    4. Adding the Cities and Landscapes Image Files to the Asset Catalog
    5. Completing the Photo Gallery App
    6. One More Thing: Adding a Custom Static Top Shelf Image
    7. Summary
    8. Exercises
  15. Chapter 6 : Adding a Dynamic Top Shelf to the Photo Gallery App
    1. Application Extensions
    2. Adding Classes and Images to the Photo Gallery Extension
    3. Implementing the TVTopShelfProvider Protocol
    4. Launching the Photo Gallery App from a Top Shelf Thumbnail Image
    5. Handling URLs
    6. Completing the Photo Gallery App
    7. Summary
    8. Exercises
  16. Chapter 7 : Storing and Sharing Data
    1. Preferences
      1. Writing Preferences
      2. Reading Preferences
      3. iCloud
      4. Summary
      5. Exercises
  17. Chapter 8 : CloudKit
    1. Considerations for Using CloudKit
    2. CloudKit Containers
      1. Databases
    3. CloudKit Databases
      1. Database Records
    4. Example CloudKit App
    5. Summary
    6. Exercises
  18. Index