---
title: "handle(intent:completion:)"
framework: intents
role: symbol
role_heading: Instance Method
path: "intents/indeletetasksintenthandling/handle(intent:completion:)"
---

# handle(intent:completion:)

Handles deleting a task.

## Declaration

```swift
func handle(intent: INDeleteTasksIntent, completion: @escaping @Sendable (INDeleteTasksIntentResponse) -> Void)
```

```swift
func handle(intent: INDeleteTasksIntent) async -> INDeleteTasksIntentResponse
```

## Parameters

- `intent`: The intent object that contains details about the user’s request. Your handler object has already resolved and confirmed this object’s information.
- `completion`: The handler block to execute with your response. You must execute this handler while implementing this method. This handler has no return value and takes the following parameter:

## Discussion

Discussion Use this method to transfer control of deleting the task to your app. Delete the task based on the information in the intent parameter, create a response object with the relevant details, and call the provided completion handler.
