<!--
{
  "availability" : [
    "iOS: 12.0.0 -",
    "iPadOS: 12.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 5.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SiriKit",
  "identifier" : "/documentation/Intents/INPlayMediaIntentResponse",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Intents"
    ],
    "preciseIdentifier" : "c:objc(cs)INPlayMediaIntentResponse"
  },
  "title" : "INPlayMediaIntentResponse"
}
-->

# INPlayMediaIntentResponse

An intents handler’s response to a play media intent.

```
class INPlayMediaIntentResponse
```

## Overview

Create an instance of this class when you are:

- Confirming your app can play the media.
- Handling the request to play the media.

To send private state data from your Intents app extension to your app, store the data in an <doc://com.apple.documentation/documentation/Foundation/NSUserActivity> object and include the object when creating the [`INPlayMediaIntentResponse`](/documentation/Intents/INPlayMediaIntentResponse) instance.

## Topics

### Creating a Play Media Intent Response

[`init(code: INPlayMediaIntentResponseCode, userActivity: NSUserActivity?)`](/documentation/Intents/INPlayMediaIntentResponse/init(code:userActivity:))

Creates a response for a play media intent.

### Providing the Response Code

[`var code: INPlayMediaIntentResponseCode`](/documentation/Intents/INPlayMediaIntentResponse/code)

A response code that indicates whether the app can play the media.

[`enum INPlayMediaIntentResponseCode`](/documentation/Intents/INPlayMediaIntentResponseCode)

Codes returned by an app or Intents app extension when handling or confirming a play media intent.

### Managing Now-Playing Information

[`var nowPlayingInfo: [String : Any]?`](/documentation/Intents/INPlayMediaIntentResponse/nowPlayingInfo)

The now-playing information, such as title and artwork, for the media.

## Relationships

### Conforms To

[`Hashable`](/documentation/Swift/Hashable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSCopying`](/documentation/Foundation/NSCopying)

[`CVarArg`](/documentation/Swift/CVarArg)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`Equatable`](/documentation/Swift/Equatable)

[`NSSecureCoding`](/documentation/Foundation/NSSecureCoding)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

### Inherits From

[`INIntentResponse`](/documentation/Intents/INIntentResponse)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)