---
title: INUpdateMediaAffinityIntent
framework: intents
role: symbol
role_heading: Class
path: intents/inupdatemediaaffinityintent
---

# INUpdateMediaAffinityIntent

A request to update the user’s affinity for a media item.

## Declaration

```swift
class INUpdateMediaAffinityIntent
```

## Mentioned in

Improving Siri Media Interactions and App Selection

## Overview

Overview Siri creates an INUpdateMediaAffinityIntent object when the user expresses a preference for or disinterest in a media item. The intent object contains the media to update. To handle this intent, the handler object in your Intents extension must adopt the INUpdateMediaAffinityIntentHandling protocol. Your handler should confirm the request and create an INUpdateMediaAffinityIntentResponse object with the media to update. Additional Intent Attributes The following table lists additional attributes of this intent object:  |   |   |

## Topics

### Initializing the Intent Object

- [init(mediaItems:mediaSearch:affinityType:)](intents/inupdatemediaaffinityintent/init(mediaitems:mediasearch:affinitytype:).md)

### Getting the Media Information

- [affinityType](intents/inupdatemediaaffinityintent/affinitytype.md)
- [INMediaAffinityType](intents/inmediaaffinitytype.md)
- [mediaItems](intents/inupdatemediaaffinityintent/mediaitems.md)
- [mediaSearch](intents/inupdatemediaaffinityintent/mediasearch.md)

## Relationships

### Inherits From

- [INIntent](intents/inintent.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [INIntentSetImageKeyPath](intents/inintentsetimagekeypath.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)

## See Also

### Update Media Affinity

- [INUpdateMediaAffinityIntentHandling](intents/inupdatemediaaffinityintenthandling.md)
- [INUpdateMediaAffinityIntentResponse](intents/inupdatemediaaffinityintentresponse.md)
