Contents

resolvePickupLocation(for:with:)

Resolves the pickup location for the ride.

Declaration

optional func resolvePickupLocation(for intent: INRequestRideIntent, with completion: @escaping  @Sendable (INPlacemarkResolutionResult) -> Void)
optional func resolvePickupLocation(for intent: INRequestRideIntent) async -> INPlacemarkResolutionResult

Parameters

  • 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, create a resolution object whose value contains the Clplacemark object you plan to use for the pickup location. This parameter must not be nil.

Discussion

Implement this method to verify that you can pick up the user at the specified location. You may specify a pickup location that is different than the one requested by the user. For example, you might specify a dedicated pickup spot or an easy to spot point of interest that is near the user’s location. If you do not implement this method, SiriKit assumes that you are able to start the ride at the specified location.

If the pickup location is outside of your service area, return a successful resolution from this method and then create an appropriate response object with the INRequestRideIntentResponseCode.failureRequiringAppLaunchNoServiceInArea code in your confirm(intent:completion:) method.

Maps does not call this method. The Maps interface lets the user specify the pickup location explicitly, making resolution of that value unnecessary.

See Also

Resolving the Intent Parameters