Instance Method

confirm(intent:completion:)

Confirms whether you can change the radio station.

Declaration

optional func confirm(intent: INSetRadioStationIntent, completion: @escaping (INSetRadioStationIntentResponse) -> Void)

Parameters

intent

The intent object containing details about the user’s request. The information in this object has already been resolved by your handler object.

completion

The handler block to execute with your response. You must execute this handler at some point during your implementation of this method. This handler has no return value and takes the following parameter:

response

The INSetRadioStationIntentResponse object containing the status of whether your app is able to change the radio station. This parameter must not be nil.

Discussion

Implement this method to validate that you can change the radio station using the given parameters. For example, automotive vendors might use this method to verify that there is an active connection to the vehicle. At some point in your implementation, execute the provided completion block with a response object indicating your app’s readiness to make the change.