<!--
{
  "availability" : [
    "iOS: 13.0.0 - 15.0.0",
    "iPadOS: 13.0.0 - 15.0.0",
    "watchOS: 6.0.0 - 8.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SiriKit",
  "identifier" : "/documentation/Intents/INDeleteTasksIntent/init(taskList:tasks:all:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Intents"
    ],
    "preciseIdentifier" : "s:So19INDeleteTasksIntentC7IntentsE8taskList5tasks3allABSo06INTaskF0CSg_SaySo0I0CGSgSbSgtcfc"
  },
  "title" : "init(taskList:tasks:all:)"
}
-->

# init(taskList:tasks:all:)

Creates the intent object with information about the task list and the tasks to delete from it.

```
@nonobjc convenience init(taskList: INTaskList? = nil, tasks: [INTask]? = nil, all: Bool? = nil)
```

## Parameters

`taskList`

The task list from which to delete tasks.

`tasks`

An array of tasks to delete.

`all`

A Boolean value that indicates whether to delete all of the tasks in the task list.

## Return Value

An initialized intent object or `nil` if the object could not be created.

## Discussion

Typically, you don’t create instances of this class yourself. Instead, SiriKit creates instances when the user asks to set the attributes of a task. However, you can use this method during testing to create intent objects that validate your intent handling code paths.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)