Class

INRideOption

Details about a type of ride offered by your ride-booking service.

Declaration

class INRideOption : NSObject

Overview

When the user books a ride through Siri or Maps, you use INRideOption objects to convey information about pricing and passenger capacity for that ride. Prior to booking, Maps asks for ride option objects representing the rides that are available from your service at that moment. Siri and Maps present ride option information to the user in appropriate contexts so that the user has information about potential rides.

You create INRideOption objects in response to ride requests and when providing the user with a list of available rides. Always fill in as many properties of ride option objects as makes sense for that ride. Ride options let you specify pricing in several different ways, including as a range of values or as a set of line-item costs. You can also specify information about any special pricing that applies to the ride right now. After configuring the ride option, deliver it with the response object you return back to SiriKit.

Topics

Initializing a Ride Option

init(name: String, estimatedPickupDate: Date)

Initializes and returns a ride option object with the specified name and pickup information.

Specifying the Ride Information

var name: String

The name of this ride option.

var estimatedPickupDate: Date

The date and time when a ride of this type could be at the user’s location.

var disclaimerMessage: String?

A localized disclaimer message to display to the user before confirming the ride.

var availablePartySizeOptions: [INRidePartySizeOption]?

An array of size options for the user to choose from.

var availablePartySizeOptionsSelectionPrompt: String?

The localized text to display for selecting party size options.

Specifying Pricing Information

var priceRange: INPriceRange?

The range of prices for this ride option.

var specialPricing: String?

A user-visible string describing any special pricing considerations that apply to this ride.

var specialPricingBadgeImage: INImage?

A template image for Maps to display when special prices apply.

var usesMeteredFare: Bool?

A Boolean value indicating whether the price uses a metered fare instead of a fixed price.

var fareLineItems: [INRideFareLineItem]?

An array of price-related items that break down the costs of the ride.

Identifying the Ride Option

var identifier: String?

A unique identifier for the ride option.

Deprecated

Launching Your App

var userActivityForBookingInApplication: NSUserActivity?

A user activity object that you can use to launch the app.

Relationships

Inherits From

See Also

Data Objects

class INRideStatus

The status of a ride booked through a ride-booking service.

class INRideDriver

Identifying information about a driver of a ride service.

class INRideVehicle

A specific vehicle used by a ride-booking service.

class INRideFareLineItem

A specific type of ride-related charge.

class INRidePartySizeOption

The price of a ride involving the specified number of people.

class INRideCompletionStatus

Additional details about whether a ride completed successfully or someone canceled the ride.

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