What’s New in the tvOS SDK

Learn about the key technologies and capabilities available in the tvOS SDK, the toolkit you use to build apps for Apple TV. For detailed information on API changes in the latest released versions, including each beta release, see the tvOS Release Notes.

tvOS 14

With the tvOS 14 SDK, games now have multiuser support and offer gamers a wider range of controller and input device options than ever before. New SwiftUI APIs allow you to enhance search features and show video from HomeKit cameras in your apps. You can also augment custom video players with Picture in Picture and system-provided controls.

Multiuser Support for Games

With multiuser support for gaming, your game can switch dynamically between users and use both Game Center and iCloud to keep track of multiple players’ individual game levels, leaderboards, and invitations. Use the new GKAccessPoint class to let users view and manage their Game Center information from within your game. To learn about supporting multiple users, see Personalizing Your App for Each User on Apple TV. For information about Game Center, see the GameKit framework. For design guidance, see the Game Center Human Interface Guidelines.

New Controller Support

Let users play your game using more of their favorite PlayStation and Xbox controllers, including Xbox Elite Wireless Controller Series 2 and the Xbox Adaptive Controller. Accept input from additional types of devices, like a touchpad, a keyboard, or a mouse. Access additional device attributes, such as battery level, haptics, and light. For more information, see the Game Controller framework.

Picture in Picture

tvOS now supports AVPictureInPictureController, allowing you to implement a custom video player that offers Picture in Picture playback. For more information, see the AVKit framework. For design guidance, see the tvOS Human Interface Guidelines.

Custom Player Controls

A new SwiftUI VideoPlayer structure lets you add system-supplied playback controls to your custom player.

Advanced Search Features

New UIKit APIs are available for providing search suggestions and updating search results.

HomeKit Cameras

Your app can use a new SwiftUI CameraView structure to display a video stream or an image snapshot. For more information, see the HomeKit framework.

tvOS 13

With the tvOS 13 SDK, your app can take advantage of multi-user support, provide content to the Top Shelf on Apple TV, and much more. You can also build more flexible and dynamic user interfaces with SwiftUI, and write modern event processing code with Combine.

Multi-User Support

tvOS 13 improves the user experience of apps that manage their own user-specific preferences by allowing them to map Apple TV user accounts to app-specific user preferences. For example, instead of prompting the user to select an app-specific profile, your app can select the appropriate user profile automatically using TVUserManager. For more information, see the TVServices framework.

Top Shelf App Extensions

Create a Top Shelf extension to provide image and video content to the Top Shelf on Apple TV. Allow users to browse featured content from your app in the new, immersive Top Shelf Carousel. To learn more about the new extension and API, see the TVServices framework documentation.

SwiftUI

SwiftUI is a modern approach to building user interfaces for iOS, macOS, watchOS, and tvOS. You can build dynamic interfaces faster than ever before, using declarative, composition-based programming. The framework provides views, controls, and layout structures for declaring your app’s user interface. It also provides event handlers for delivering taps, gestures, and other types of input to your app, and tools to manage the flow of data from your app’s models down to the views and controls that users will see and interact with.

To get started, see Learn to Make Apps Using SwiftUI.

Metal

Metal gives the GPU even greater control of the graphics and compute pipeline, adds features that make it easier to perform advanced GPU processing, and simplifies the work you need to do to support different kinds of GPUs. New tools, including Metal support in Simulator, help you get started faster and understand whether your iOS app is using Metal correctly. For more information, see Metal.

Metal Performance Shaders provides new options for image processing, Machine Learning, and ray tracing, including GPU generation and dynamic updates of ray tracing acceleration structures. For more information, see the Metal Performance Shaders framework documentation.

Background Tasks

Keep your app content up-to-date and perform long-running tasks while your app is in the background using the new BackgroundTasks framework. For more information, see the BackgroundTasks framework documentation.

Combine

Combine is a new framework that provides a declarative Swift API for processing values over time. These values can represent user interface events, network responses, scheduled events, and many other kinds of asynchronous data. With Combine, you declare publishers that expose values that can change, and subscribers that receive those values from the publishers. Combine makes your code easier to read and maintain, by centralizing your event-processing code and eliminating troublesome techniques like nested closures and convention-based callbacks.

For more information, see the Combine framework documentation.

Apple CryptoKit

Use the new Apple CryptoKit framework to perform common cryptographic operations securely and efficiently, such as:

  • Computing and comparing cryptographically secure digests.
  • Using public-key cryptography to create and evaluate digital signatures.
  • Generating symmetric keys, and using them in other operations like message authentication and encryption.

For more information, see the Apple CryptoKit framework documentation.