Framework

TVMLKit

Evaluate TVMLKit JS and TVML files from within your tvOS app. Customize and create TVML elements, styles, views, and view controllers through the JavaScript environment.

Overview

The TVMLKit framework enables you to incorporate JavaScript and TVML files in your binary apps to create client-server apps.

Symbols

Interacting with the JavaScript Environment

TVApplicationController

The TVApplicationController class establishes the JavaScript environment and provides a centralized point of control and coordination between the JavaScript environment and tvOS. The class bridges the UI, navigation stack, storage, and event handling from JavaScript.

TVApplicationControllerContext

The TVApplicationControllerContext class provides launch information to the TV application controller.

TVApplicationControllerDelegate

The TVApplicationControllerDelegate protocol defines methods that allow you to observe and manage different states of a TVApplicationController object.

Creating Views and View Controllers

TVInterfaceCreating

The TVInterfaceCreating factory protocol declares methods that are used to create views and view controllers from a TVViewElement.

TVInterfaceFactory

The TVInterfaceFactory class provides a factory for the creation of views and view controllers. The app can extend or override the framework implementation by setting extendedInterfaceCreator.

TVViewElement

A TVViewElement object represents a read-only DOM node along with it's attributes and aggregated styles. The TVViewElement model object is traversed by the TVInterfaceFactory factory to construct views and view controllers, and to render templates. Views and view controllers should use the available dispatch APIs to send user events to JavaScript.

Working with Custom Styles

TVColor

The TVColor class describes the color data used by color styles.

TVViewElementStyle

A TVViewElementStyle object represents a style applied to a view element.

TVStyleFactory

The TVStyleFactory class is used to register custom style properties.

Working with Custom Elements

TVElementFactory

The TVElementFactory class lets you register new elements to extend the Apple TV Markup Language (TVML). You must register new elements before initializing a TVApplicationController object.

TVImageElement

A TVImageElement object represents a read-only DOM node containing the attributes that describe an image element.

TVTextElement

A TVTextElement object that represents the textual content for the DOM element.