Contents

presentProfilePreferencePanel(currentSettings:availableProfiles:completion:)

Presents a user-to-profile configuration panel, which lets the user specify their preferred profile.

Declaration

func presentProfilePreferencePanel(currentSettings: [TVUserIdentifier : TVAppProfileDescriptor], availableProfiles: [TVAppProfileDescriptor], completion: @escaping  @Sendable ([TVUserIdentifier : TVAppProfileDescriptor]) -> Void)
func presentProfilePreferencePanel(currentSettings: [TVUserIdentifier : TVAppProfileDescriptor], availableProfiles: [TVAppProfileDescriptor]) async -> [TVUserIdentifier : TVAppProfileDescriptor]

Parameters

  • availableProfiles:

    The complete list of app-specific profiles available in your app. The configuration panel displays this set of profiles to the user.

  • completion:

    The completion handler to call when the user dismisses the configuration panel. This handler has no return value and takes the following parameter:

    newSettings

    A dictionary containing an updated map from system user to app profile. The information is similar to what you provide in the existingSettings parameter, but reflects the changes made by the user.

Discussion

Calling this method displays a panel that lets the user configure which app-specific profile to associate with each Apple TV user account. The panel gives the user the option to select from any of the profiles in the availableProfiles parameter. It also uses the information in the existingSettings parameter to configure the initial mapping between users and profiles. After configuring the user accounts and dismissing the panel, the system calls your completion handler to deliver the updated mapping between user accounts and profiles.

See Also

Deprecated symbols