---
title: INMediaUserContext
framework: intents
role: symbol
role_heading: Class
path: intents/inmediausercontext
---

# 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](/documentation/intents/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()](/documentation/intents/inusercontext/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:

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

Inherits From

[INUserContext](/documentation/intents/inusercontext)

Conforms To

[CVarArg](/documentation/Swift/CVarArg) [CustomDebugStringConvertible](/documentation/Swift/CustomDebugStringConvertible) [CustomStringConvertible](/documentation/Swift/CustomStringConvertible) [Equatable](/documentation/Swift/Equatable) [Hashable](/documentation/Swift/Hashable) [NSCoding](/documentation/Foundation/NSCoding) [NSObjectProtocol](/documentation/ObjectiveC/NSObjectProtocol) [NSSecureCoding](/documentation/Foundation/NSSecureCoding)
