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

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

Initializes the intent object with the specified task details.

## Declaration

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

## 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.

## Return Value

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

## Discussion

Discussion Normally, you do not create instances of this class yourself. Instead, 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:priority:)](intents/inaddtasksintent/init(targettasklist:tasktitles:spatialeventtrigger:temporaleventtrigger:priority:).md)
