Class

INCancelRideIntent

An intent requesting the cancellation of a previously booked ride.

Declaration

@interface INCancelRideIntent : INIntent

Overview

When the user cancels a ride that was previously booked through Siri or Maps, SiriKit sends an INCancelRideIntent object to your handler. SiriKit populates this intent object with the ride identifier that you provided when originally booking the ride. Upon receiving this intent, verify the ride information and cancel the ride accordingly.

To handle this intent, the handler object in your Intents extension must adopt the INCancelRideIntentHandling protocol. Your handler should confirm the request and create an INCancelRideIntentResponse object with the status of the ride.

SiriKit prefers sending this intent 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 this intent is unavailable or not supported by your extension.

Additional Intent Attributes

Table 1 lists additional attributes of this intent object.

Table 1

Cancel ride intent attributes

Attribute

Description

Supported by

Maps

Always requires unlocked device

Yes

Topics

Initializing an Intent Object

- initWithRideIdentifier:

Initializes the intent object with the specified ride identifier.

Identifying the Ride

rideIdentifier

The unique identifier that you assigned to the ride.

Relationships

Inherits From

See Also

Cancel Ride

INCancelRideIntentHandling

The handler interface for canceling a previously booked ride.

INCancelRideIntentResponse

Your app’s response to a cancel ride intent.

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