TVUserManager
An object that indicates how to store preferences for multiple people on a shared device.
Declaration
class TVUserManagerOverview
Some apps rely on profiles to maintain separate information for each person who uses a shared device, such as a video content app that retains which shows they watch. To avoid interrupting people with a profile picker each time they launch your app, you can save and retrieve the current user’s selection on a shared device.
To determine the current user’s profile, first check shouldStorePreferencesForCurrentUser. If that value is false, display the profile picker to determine which profile to use for the current session, but don’t save the selected profile. If the value is true, and there isn’t a saved profile in UserDefaults, display the profile picker and save the selected profile for future use. If the value is true and there’s already a saved profile, skip the prompt and use the saved profile.