Contents

resolveStatus(for:with:)

Resolves the intended status of the task.

Declaration

optional func resolveStatus(for intent: INSetTaskAttributeIntent, with completion: @escaping  @Sendable (INTaskStatusResolutionResult) -> Void)
optional func resolveStatus(for intent: INSetTaskAttributeIntent) async -> INTaskStatusResolutionResult

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 Intaskstatus value that you intend to assign to the task.

Discussion

Implement this method to resolve the task’s intended status. In most cases, you return a successful resolution with the requested status. In the event that you cannot change the status to the requested value, return a successful result from this method and use your confirmation method to report the failure.

See Also

Resolving the Intent Parameters