Protocol

INCancelRideIntentHandling

The handler interface for canceling a previously booked ride.

Declaration

@protocol INCancelRideIntentHandling

Overview

Use the methods of the INCancelRideIntentHandling protocol to confirm and handle requests to cancel the user’s currently active ride. Adopt this protocol in an object of your Intents extension that is capable of canceling the ride with your service.

Users may cancel rides from Siri or Maps. When the user requests to cancel a booked ride, SiriKit may send an INGetRideStatusIntent object to your extension first to verify that a ride is still active and to retrieve the associated ride identifier. It includes that ride identifier in the INCancelRideIntent object that it sends to your Intents extension.

SiriKit prefers sending an INCancelRideIntent object to your extension over canceling a ride by other means. So when responding to an INRequestRideIntent object, you can continue to set the userActivityForCancelingInApplication property of your response’s INRideStatus object to allow cancellation of the ride in your app. SiriKit uses that NSUserActivity object only on systems where the cancellation intent is unavailable or not supported by your extension.

Topics

Confirming the Response

- confirmCancelRide:completion:

Confirms that you can cancel the ride.

Handling the Intent

- handleCancelRide:completion:

Handles the user canceling an unfinished ride.

Required.

Relationships

Inherits From

See Also

Cancel Ride

INCancelRideIntent

An intent requesting the cancellation of a previously booked ride.

INCancelRideIntentResponse

Your app’s response to a cancel ride intent.