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.
With the tvOS 15 SDK, you can let people sign in to your app and authorize purchases using Face ID or Touch ID on their iPhone or iPad. A redesigned playback UI provides users with convenient access to relevant controls and information while always focusing on the content. MusicKit makes it easy to integrate Apple Music into your tvOS apps using Swift. And the App Attest API helps validate the integrity of your app before your server provides access to sensitive data.
Let people use Face ID or Touch ID on their iPhone or iPad to authorize purchases and sign in to your tvOS app. To implement this new tvOS sign-in capability in your app, learn about the new Authentication Services APIs and Associated Domains frameworks.
New playback UI
Build a great media experience with an all-new playback UI on Apple TV. The redesigned UI provides users with convenient access to relevant controls and information while always focusing on the content. The new UI includes a new Transport Bar, Title View, Transport Bar Controls, Content Tabs, and Contextual Actions. Use the API in AVPlayerViewController to give users a more streamlined way to watch content.
Easily integrate Apple Music into your tvOS apps using Swift. The MusicKit framework provides a new model layer for accessing music items in Swift, as well as playback support so you can add music to your app.
DeviceCheck and App Attest
Part of the DeviceCheck services, the App Attest API helps protect against security threats to your tvOS apps by letting you generate a special cryptographic key on a device to validate the integrity of your app before your server provides access to sensitive data.
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 documentation for 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
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.
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 documentation for 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 documentation for the TVServices framework.
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 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 documentation for the Metal Performance Shaders framework.
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 documentation for the BackgroundTasks framework.
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 documentation for the Combine framework.
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 documentation for the Apple CryptoKit framework.