---
title: "init(targetTaskList:taskTitles:spatialEventTrigger:temporalEventTrigger:priority:)"
framework: intents
role: symbol
role_heading: Initializer
path: "intents/inaddtasksintent/init(targettasklist:tasktitles:spatialeventtrigger:temporaleventtrigger:priority:)"
---

# init(targetTaskList:taskTitles:spatialEventTrigger:temporalEventTrigger:priority:)

Initializes the intent object with the specified task details.

## Declaration

```swift
init(targetTaskList: INTaskList?, taskTitles: [INSpeakableString]?, spatialEventTrigger: INSpatialEventTrigger?, temporalEventTrigger: INTemporalEventTrigger?, priority: INTaskPriority)
```

## Parameters

- `targetTaskList`: The task list in which to create the new tasks.
- `taskTitles`: An array of strings, each of which represents a task to add to the task list.
- `spatialEventTrigger`: An doc://com.apple.sirikit/documentation/Intents/INSpatialEventTrigger object that contains details of when reminders should be sent for the tasks. The trigger applies to all tasks being added.
- `temporalEventTrigger`: An doc://com.apple.sirikit/documentation/Intents/INTemporalEventTrigger object that contains details of when reminders should be sent for the tasks. The trigger applies to all tasks being added.
- `priority`: The priority for the task.

## Return Value

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

## Discussion

Discussion Typically, you don’t create instances of this class yourself. SiriKit creates instances when the user asks to add tasks to a task list. However, you can use this method during testing to create intent objects in order to validate your intent handling code paths.

## See Also

### Initializing the Intent Object

- [init(targetTaskList:taskTitles:spatialEventTrigger:temporalEventTrigger:)](intents/inaddtasksintent/init(targettasklist:tasktitles:spatialeventtrigger:temporaleventtrigger:).md)
