resolveRideOptionName(for:with:)
Resolves the user’s selected ride option.
Declaration
optional func resolveRideOptionName(for intent: INRequestRideIntent, with completion: @escaping @Sendable (INSpeakableStringResolutionResult) -> Void)optional func resolveRideOptionName(for intent: INRequestRideIntent) async -> INSpeakableStringResolutionResultParameters
- intent:
The intent object containing details about the user’s request. Use this object to get the initial information, if any, provided by the user.
- completion:
The handler block to execute with the resolution. You must execute this handler at some point during your implementation of this method. This handler has no return value and takes the following parameter:
- resolutionResult
The resolution result object containing information about your proposed resolution. For successful resolutions, specify an Nsstring object that corresponds to the Name property of the Inrideoption object you use to describe one of your company’s ride options. This parameter must not be
nil.
Discussion
Implement this method to identify the type of ride that the user requested. Siri places the name of the ride option in the intent parameter. That name corresponds either to a ride option name defined in your global vocabulary file or a spoken term that Siri interpreted as the preferred ride option. Use the provided information to ensure that you recognize the vehicle type and that a vehicle of that type is available. If the specified vehicle type is not available, create a resolution result containing a different ride option and ask the user to confirm the new value.
If you do not implement this method, Siri assumes that you are able to book the ride using the information provided by the user.
Maps does not call this method. The Maps interface lets the user choose a ride option explicitly, making resolution of that value unnecessary.