Contents

initWithPickupLocation:dropOffLocation:rideOptionName:partySize:paymentMethod:

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;

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.

Return Value

An initialized intent object or nil if the object could not be created.

Discussion

Normally, you do not 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.

See Also

Initializing the Intent Object