Class

UserDefaults

An object that contains the app's default preferences.

Declaration

interface UserDefaults

Overview

The UserDefaults class is exposed to the JavaScript context as userDefaults.

Topics

Modifying User Defaults

getData

Returns the data associated with a particular key.

removeData

Removes the data associated with a particular key.

setData

Stores the data for a given key.

See Also

App Initialization

App

An object that provides access to—and a means to respond to—app life-cycle events.

NavigationDocument

A document stack that holds the individual TVML documents for a client-server app.

Responding to User Interaction

Update onscreen information by adding event listeners to your Apple TV app.

EventListenerObject

An object that communicates events and allows other objects to add themselves as listeners.