Contents

resolveSpatialEventTrigger(for:with:)

Resolves the location-based trigger associated with the new tasks.

Declaration

optional func resolveSpatialEventTrigger(for intent: INAddTasksIntent, with completion: @escaping  @Sendable (INSpatialEventTriggerResolutionResult) -> Void)
optional func resolveSpatialEventTrigger(for intent: INAddTasksIntent) async -> INSpatialEventTriggerResolutionResult

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 object containing the details of your proposed resolution. For successful resolutions, create a resolution object with the Inspatialeventtrigger object representing the trigger that you intend to use.

Discussion

Implement this method to resolve the location-based trigger associated with the new tasks. Use the intent object to obtain the trigger information, if any, suggested by the user. If the intent doesn’t contain any trigger information, and you do not require any, return a resolution indicating that you do not require a value. If the placemark information in the trigger is insufficient to identify the intended location, you might ask the user to choose from two to five triggers with different locations that match the provided placemark data.

See Also

Resolving the Intent Parameters