Core SDK
Introduction
The Core SDK provides the fundamental methods for initializing and configuring the Maestro tvOS SDK. These methods serve as the entry point for integrating the SDK into your tvOS application and allow you to authenticate users, manage event lifecycles, and handle SDK configuration.
SDK Entry Point
The Maestro tvOS SDK follows a singleton pattern through the MaestroManager.shared instance:
import MaestroKit
MaestroManager.shared.configure(...)
Key Responsibilities
SDK Configuration: The
configure()method initializes the SDK with your site ID, user authentication, and other required parameters. This is typically the first method you call when integrating the SDK.Event Lifecycle Management: The
userDidStartWatchingEvent()anduserDidStopWatchingEvent()methods manage the lifecycle of events, initializing necessary resources when a user starts watching an event and cleaning up when they stop.Authentication Management: The
authenticateUser()anddeauthenticateUser()methods handle user authentication state within the SDK.State Retrieval: Methods like
getCurrentSiteID(),getCurrentJwt(), andgetCurrentSwid()provide access to the current SDK configuration and authentication details.
Methods
| Method | Description |
|---|---|
| configure() | Initializes the Maestro tvOS SDK with required configuration parameters. |
| userDidStartWatchingEvent() | Indicates that a user has started watching an event and initializes the event interface. |
| userDidStopWatchingEvent() | Indicates that a user has stopped watching an event and cleans up resources. |
| authenticateUser() | Authenticates a user with their JWT token. |
| deauthenticateUser() | Deauthenticates the current user. |
| getCurrentSiteId() | Retrieves the current site ID. |
| getCurrentJwt() | Retrieves the current JWT token. |
| getCurrentSwid() | Retrieves the current SWID. |
| getDefaultPanel() | Retrieves the default panel type. |