initWithPickupLocation:dropOffLocation:rideOptionName:partySize:paymentMethod:scheduledPickupTime:
Initializes an intent object with the specified ride information.
Declaration
- (instancetype) initWithPickupLocation:(CLPlacemark *) pickupLocation dropOffLocation:(CLPlacemark *) dropOffLocation rideOptionName:(INSpeakableString *) rideOptionName partySize:(NSNumber *) partySize paymentMethod:(INPaymentMethod *) paymentMethod scheduledPickupTime:(INDateComponentsRange *) scheduledPickupTime;Parameters
- pickupLocation:
The starting location for the ride.
- dropOffLocation:
The destination of the ride.
- rideOptionName:
The name of the ride option (if any) selected by the user.
- partySize:
The number of passengers that the ride must accommodate.
- paymentMethod:
The payment method requested by the user.
- scheduledPickupTime:
The time at which the user wants to be picked up.
Return Value
An initialized intent object or nil if the object could not be created.
Discussion
Normally, you don’t create instances of this class yourself. Instead, SiriKit creates instances when the user tries to book a ride. However, you can use this method during testing to create intent objects in order to validate your intent handling code paths.