---
title: "resolveAffinityType(for:with:)"
framework: intents
role: symbol
role_heading: Instance Method
path: "intents/inupdatemediaaffinityintenthandling/resolveaffinitytype(for:with:)"
---

# resolveAffinityType(for:with:)

Resolves the affinity type to which the media item is updated.

## Declaration

```swift
optional func resolveAffinityType(for intent: INUpdateMediaAffinityIntent, with completion: @escaping @Sendable (INMediaAffinityTypeResolutionResult) -> Void)
```

```swift
optional func resolveAffinityType(for intent: INUpdateMediaAffinityIntent) async -> INMediaAffinityTypeResolutionResult
```

## Parameters

- `intent`: The intent object that contains details about the user’s request. Use this object to get the initial information, if any, provided by the user.
- `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 Implement this method to resolve the affinity type to which the media item is updated. Always strive toward a successful resolution to the specific media items, but feel free to ask for confirmation of the selected media items if there’s some uncertainty about the media items chosen. If you find multiple media items matching the same name, consider asking the user to disambiguate from among the most likely candidates. note: Don’t ask users for confirmation or disambiguation too often, as users may become frustrated and exit Siri.

## See Also

### Resolving Details of the Intent

- [resolveMediaItems(for:with:)](intents/inupdatemediaaffinityintenthandling/resolvemediaitems(for:with:).md)
