Instance Property

currentUserIdentifier

A unique identifier representing the currently active Apple TV user.

Declaration

var currentUserIdentifier: TVUserIdentifier? { get }

Discussion

Use this property to identify which Apple TV user is currently active. On Apple TV, users may provide credentials for multiple Apple accounts and switch quickly between them. This property uniquely identifies the user for the active account. You might use this information to select an appropriate user profile for your app.

The string in this property is randomly generated, and is not the same as the user's Apple ID. Do not display the string to your users. All Apple TVs on the user's HomeKit network return the same string for the same account.

You can track changes to this property using key-value observing. You may access this property from an app extension.

See Also

Identifying the Current Apple TV User

typealias TVUserIdentifier

A unique string for differentiating between accounts on Apple TV.