resolvePartySize(for:with:)
Resolves the number of passengers for the ride.
Declaration
optional func resolvePartySize(for intent: INRequestRideIntent, with completion: @escaping @Sendable (INIntegerResolutionResult) -> Void)optional func resolvePartySize(for intent: INRequestRideIntent) async -> INIntegerResolutionResultParameters
- 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 integer value containing the number of people that the proposed ride can accommodate. This parameter must not be
nil.
Discussion
Implement this method to verify that the chosen vehicle type can accommodate the specified number of passengers. If the user’s party is too big to fit in the same vehicle, return a response indicating the number of passengers that you can accommodate.
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 specify the party size explicitly, making resolution of that value unnecessary.