---
title: INUpdateMediaAffinityIntentResponse
framework: intents
role: symbol
role_heading: Class
path: intents/inupdatemediaaffinityintentresponse
---

# INUpdateMediaAffinityIntentResponse

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

## Declaration

```swift
class INUpdateMediaAffinityIntentResponse
```

## Overview

Overview Use an 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 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 object in the confirm(intent:completion:) and handle(intent:completion:) methods of your add media handler object. For more information about implementing your handler object, see INUpdateMediaAffinityIntentHandling.

## Topics

### Initializing the Response Object

- [init(code:userActivity:)](intents/inupdatemediaaffinityintentresponse/init(code:useractivity:).md)

### Providing the Response Code

- [code](intents/inupdatemediaaffinityintentresponse/code.md)
- [INUpdateMediaAffinityIntentResponseCode](intents/inupdatemediaaffinityintentresponsecode.md)

## Relationships

### Inherits From

- [INIntentResponse](intents/inintentresponse.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.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)
- [INUpdateMediaAffinityIntent](intents/inupdatemediaaffinityintent.md)
