An intents handler’s response to a search media intent.


class INSearchForMediaIntentResponse : INIntentResponse


Use an INSearchForMediaIntentResponse object to specify the results after searching for the user-specified media. After performing the search action using the criteria specified in the INSearchForMediaIntent object, create an instance of this class with the results of the action. Siri communicates the status from your response to the user, at appropriate times.

You create an INSearchForMediaIntentResponse 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 INSearchForMediaIntentHandling.


Initializing the Response Object

init(code: INSearchForMediaIntentResponseCode, userActivity: NSUserActivity?)

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

Providing the Response Code

var code: INSearchForMediaIntentResponseCode

A response code that indicates whether the app successfully searched for the media.

enum INSearchForMediaIntentResponseCode

Codes returned by an intents handler in response to a search request.

Accessing the Media Item

var mediaItems: [INMediaItem]?

The media items that were found by the search.


Inherits From

Conforms To

See Also

Search for Media

protocol INSearchForMediaIntentHandling

The interface that handles media search requests.

class INSearchForMediaIntent

A request to search for a media item.