---
title: "resolveMediaItems(for:with:)"
framework: intents
role: symbol
role_heading: Instance Method
path: "intents/inplaymediaintenthandling/resolvemediaitems(for:with:)"
---

# resolveMediaItems(for:with:)

Resolves the media items to play.

## Declaration

```swift
optional func resolveMediaItems(for intent: INPlayMediaIntent, with completion: @escaping @Sendable ([INPlayMediaMediaItemResolutionResult]) -> Void)
```

```swift
optional func resolveMediaItems(for intent: INPlayMediaIntent) async -> [INPlayMediaMediaItemResolutionResult]
```

## Parameters

- `intent`: The object that contains details about the user’s request. Use this object to get any initial information the user may have provided.
- `completion`: The block to execute with the resolution. You must execute this block while implementing this method. This block has no return value and takes the following parameter:

## Discussion

Discussion important: You must implement this resolve method. The other resolve methods in this protocol are optional. Implement this method to resolve the media items to play. If your app isn’t completely sure of the match, return a few results with the best match first. The system can start playing the first item and offer the alternatives in case the user wants to play one of them instead.

## See Also

### Resolving the Intent Parameters

- [resolvePlayShuffled(for:with:)](intents/inplaymediaintenthandling/resolveplayshuffled(for:with:).md)
- [resolvePlaybackQueueLocation(for:with:)](intents/inplaymediaintenthandling/resolveplaybackqueuelocation(for:with:).md)
- [resolvePlaybackRepeatMode(for:with:)](intents/inplaymediaintenthandling/resolveplaybackrepeatmode(for:with:).md)
- [resolvePlaybackSpeed(for:with:)](intents/inplaymediaintenthandling/resolveplaybackspeed(for:with:).md)
- [resolveResumePlayback(for:with:)](intents/inplaymediaintenthandling/resolveresumeplayback(for:with:).md)
