Class

INRequestRideIntentResponse

Your app’s response to a request ride intent.

Overview

An INRequestRideIntentResponse object contains your app’s response to a ride-booking request. After creating your response object, assign an appropriate object to the rideStatus property. The ride status object provides the details about how you handled the ride, including details about selected vehicle type, pricing, driver information, pickup time, pickup location, drop-off location, and so on. Siri and Maps display your response information to the user during the confirmation and booking phases.

Siri and Maps expect your response to contain a valid INRideStatus object with information about the ride. Specifically, your status object must include a valid INRideOption object and you should always specify an activity object in the userActivityForCancelingInApplication property of your status object. When handling the intent, the INRequestRideIntentResponseCode.unspecified and INRequestRideIntentResponseCode.ready codes generate an error and should not be used.

You create an INRequestRideIntentResponse object in the confirm(intent:completion:) and handle(intent:completion:) methods of your handler object. For more information about implementing your handler object, see INRequestRideIntentHandling.

Topics

Initializing the Response Object

init(code: INRequestRideIntentResponseCode, userActivity: NSUserActivity?)

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

Getting the Response Code

var code: INRequestRideIntentResponseCode

The code indicating whether you successfully handled the intent.

enum INRequestRideIntentResponseCode

Constants indicating the state of the response.

Accessing the Response Parameters

var rideStatus: INRideStatus?

The current status of the ride.

Relationships

Inherits From

Conforms To

See Also

Request a Ride

protocol INRequestRideIntentHandling

The handler interface for booking a ride for the user.

class INRequestRideIntent

A request to book the specified ride from your service.