handle(intent:completion:)
Handles the modification of the attributes of a task.
Declaration
func handle(intent: INSetTaskAttributeIntent, completion: @escaping @Sendable (INSetTaskAttributeIntentResponse) -> Void)func handle(intent: INSetTaskAttributeIntent) async -> INSetTaskAttributeIntentResponseParameters
- intent:
The intent object containing details about the user’s request. The information in this object has already been resolved and confirmed by your handler object.
- completion:
The handler block to execute with your response. 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:
- response
The Insettaskattributeintentresponse object containing the status of the request. This parameter must not be
nil.
Discussion
In your implementation of this method, update the task based on the information in the intent parameter, create a response object with the relevant details, and call the provided completion handler.