INMediaUserContext

INMediaUserContext

INMediaUserContext Class of Intents An object that provides user information to Siri.

class INMediaUserContext

Overview

When your media app launches, create an INMediaUserContext. Provide the number of items the user has in their library and indicate whether the user has a current paid subscription. Then call becomeCurrent()) to share this user context with the system. The following code listing shows how to set the current context for a user with a paid subscription and a few hundred items in their library:

let context = INMediaUserContext()
context.numberOfLibraryItems = 345
context.subscriptionStatus = .subscribed
context.becomeCurrent()

Inherits From

INUserContext

Conforms To

CVarArg CustomDebugStringConvertible CustomStringConvertible Equatable Hashable NSCoding NSObjectProtocol NSSecureCoding