Instance Method

resolvePickupLocation(for:with:)

Resolves the user’s pickup location.

Declaration

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

Parameters

intent

The intent object containing details about the user’s request. Use this object to get the initial information provided by the user.

completion

The block to execute with the resolution. This block has no return value and takes the following parameter:

resolutionResult

The object containing the details of your proposed resolution. For successful resolutions, create a resolution object with the CLPlacemark object with the user’s requested pickup location. This parameter must not be nil.

Discussion

Implement this method to verify that you are able to pick up the user at the specified location. If you are unable to pick up the user at the requested location, you can provide a nearby location and ask the user to confirm the new value. You can also provide other resolutions as appropriate.

If you do not implement this method, SiriKit assumes you are able to pick up the user at the specified location.

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