<!--
{
  "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/INUpdateMediaAffinityIntentResponse",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Intents"
    ],
    "preciseIdentifier" : "c:objc(cs)INUpdateMediaAffinityIntentResponse"
  },
  "title" : "INUpdateMediaAffinityIntentResponse"
}
-->

# INUpdateMediaAffinityIntentResponse

An intents handler’s response to an update media affinity intent.

```
class INUpdateMediaAffinityIntentResponse
```

## Overview

Use an [`INUpdateMediaAffinityIntentResponse`](/documentation/Intents/INUpdateMediaAffinityIntentResponse) object to specify the results from trying to update the user’s affinity for a media item. After performing the add action using the criteria specified in the [`INUpdateMediaAffinityIntent`](/documentation/Intents/INUpdateMediaAffinityIntent) object, create an instance of this class with the results of the action. Siri communicates the response status to the user at appropriate times.

You create an [`INUpdateMediaAffinityIntentResponse`](/documentation/Intents/INUpdateMediaAffinityIntentResponse) object in the [`confirm(intent:completion:)`](/documentation/Intents/INUpdateMediaAffinityIntentHandling/confirm(intent:completion:)) and [`handle(intent:completion:)`](/documentation/Intents/INUpdateMediaAffinityIntentHandling/handle(intent:completion:)) methods of your add media handler object. For more information about implementing your handler object, see [`INUpdateMediaAffinityIntentHandling`](/documentation/Intents/INUpdateMediaAffinityIntentHandling).

## Topics

### Initializing the Response Object

[`-  initWithCode:userActivity:`](/documentation/Intents/INUpdateMediaAffinityIntentResponse/init(code:userActivity:))

Initializes the response object with the specified code and user activity object.

### Providing the Response Code

[`code`](/documentation/Intents/INUpdateMediaAffinityIntentResponse/code)

The code that indicates whether the app successfully updated the user’s affinity for the media.

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

Codes returned by an intents handler in response to an update media affinity request.

## Relationships

### Conforms To

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

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

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

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

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

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

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

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

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

### Inherits From

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

---

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)