Your app’s response to an update media affinity intent.


class INUpdateMediaAffinityIntentResponse : INIntentResponse


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.


Initializing the Response Object

init(code: INUpdateMediaAffinityIntentResponseCode, userActivity: NSUserActivity?)

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

Getting the Response Code

var code: INUpdateMediaAffinityIntentResponseCode

The code that indicates whether your app successfully handled the intent.

enum INUpdateMediaAffinityIntentResponseCode

Constants that indicate the status of the update affinity request.


Inherits From

Conforms To

See Also

Update Media Affinity

protocol INUpdateMediaAffinityIntentHandling

The interface that handles requests to update the user’s preference for a media item.

class INUpdateMediaAffinityIntent

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


Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software