confirm(intent:completion:)
Confirms whether you can modify the task’s attributes.
Declaration
optional func confirm(intent: INSetTaskAttributeIntent, completion: @escaping @Sendable (INSetTaskAttributeIntentResponse) -> Void)optional func confirm(intent: INSetTaskAttributeIntent) async -> INSetTaskAttributeIntentResponseParameters
- intent:
The intent object containing details about the user’s request. The information in this object has already been resolved 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. The handler has no return value and takes the following parameter:
- response
The Insettaskattributeintentresponse object containing the details to confirm with the user. This parameter must not be
nil. The handler block to execute with your response. You must execute this handler at some point during your implementation of this method. The handler has no return value and takes the following parameter:
Discussion
Implement this method to validate that you can modify the task, but do not do so yet. If modifying tasks involves contacting a remote server, validate that your server is available and ready to handle requests. In your implementation, execute the provided completion block with a response object indicating your app’s readiness to change the attributes of the task.