confirm(intent:completion:)
Confirms the details of the media search request.
Declaration
optional func confirm(intent: INSearchForMediaIntent, completion: @escaping @Sendable (INSearchForMediaIntentResponse) -> Void)optional func confirm(intent: INSearchForMediaIntent) async -> INSearchForMediaIntentResponseParameters
- intent:
The Insearchformediaintent object that contains details about the user’s request.
- completion:
The handler block to execute with your response. You must execute this handler while implementing this method. This handler has no return value and takes the following parameter:
responseThe Insearchformediaintentresponse object that contains the response code which determines whether your app can search for the media content. This parameter must not be
nil.
Discussion
Implement this method to determine whether your app can search for the requested media. If it can, respond with the INSearchForMediaIntentResponseCode.ready response code.
If your app can’t search for the media, respond with the appropriate failure code.