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

# INUpdateMediaAffinityIntent

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

```
class INUpdateMediaAffinityIntent
```

## Overview

Siri creates an [`INUpdateMediaAffinityIntent`](/documentation/Intents/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`](/documentation/Intents/INUpdateMediaAffinityIntentHandling) protocol. Your handler should confirm the request and create an [`INUpdateMediaAffinityIntentResponse`](/documentation/Intents/INUpdateMediaAffinityIntentResponse) object with the media to update.

### Additional Intent Attributes

The following table lists additional attributes of this intent object:

|Attribute                      |Description              |
|-------------------------------|-------------------------|
|Supported by                   |Siri Intents (audio only)|
|Always requires unlocked device|No                       |

## Topics

### Initializing the Intent Object

[`-  initWithMediaItems:mediaSearch:affinityType:`](/documentation/Intents/INUpdateMediaAffinityIntent/init(mediaItems:mediaSearch:affinityType:))

Creates an intent that describes the media items, their location, and the affinity to update.

### Getting the Media Information

[`affinityType`](/documentation/Intents/INUpdateMediaAffinityIntent/affinityType)

The user’s affinity for the media item.

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

Constants that describe a user’s affinity for a media item.

[`mediaItems`](/documentation/Intents/INUpdateMediaAffinityIntent/mediaItems)

The media items to update.

[`mediaSearch`](/documentation/Intents/INUpdateMediaAffinityIntent/mediaSearch)

The type of item to search for.

## Relationships

### Conforms To

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

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

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

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

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

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

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

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

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

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

### Inherits From

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

---

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)