---
title: "confirm(intent:completion:)"
framework: intents
role: symbol
role_heading: Instance Method
path: "intents/inplaymediaintenthandling/confirm(intent:completion:)"
---

# confirm(intent:completion:)

Confirms the details of the media playback request.

## Declaration

```swift
optional func confirm(intent: INPlayMediaIntent, completion: @escaping @Sendable (INPlayMediaIntentResponse) -> Void)
```

```swift
optional func confirm(intent: INPlayMediaIntent) async -> INPlayMediaIntentResponse
```

## Parameters

- `intent`: The doc://com.apple.sirikit/documentation/Intents/INPlayMediaIntent object that contains details about the user’s request.
- `completion`: The handler block to execute with your response. You must execute this handler while implementing this method. This handler has no return value and takes the following parameter:

## Discussion

Discussion Implement this method to determine whether your app can play the requested media. If it can, respond with the INPlayMediaIntentResponseCode.ready response code. Include the nowPlayingInfo dictionary in the response, so the system can display information such as title, artist, and artwork, about the media. When your Intents app extension doesn’t provide this method, the system assumes your app can play the media. If your app can’t play the media, respond with the appropriate failure code.
