---
title: "init(title:status:taskType:spatialEventTrigger:temporalEventTrigger:createdDateComponents:modifiedDateComponents:identifier:priority:)"
framework: intents
role: symbol
role_heading: Initializer
path: "intents/intask/init(title:status:tasktype:spatialeventtrigger:temporaleventtrigger:createddatecomponents:modifieddatecomponents:identifier:priority:)"
---

# init(title:status:taskType:spatialEventTrigger:temporalEventTrigger:createdDateComponents:modifiedDateComponents:identifier:priority:)

Initializes a task object with the specified content and triggers.

## Declaration

```swift
init(title: INSpeakableString, status: INTaskStatus, taskType: INTaskType, spatialEventTrigger: INSpatialEventTrigger?, temporalEventTrigger: INTemporalEventTrigger?, createdDateComponents: DateComponents?, modifiedDateComponents: DateComponents?, identifier: String?, priority: INTaskPriority)
```

## Parameters

- `title`: The title text that describes the task. This string is what the user enters for the task details.
- `status`: The current state of the task. Tasks can be completed or not completed.
- `taskType`: Information about how the task behaves in your app. Use this parameter to specify whether the task can be marked as completed.
- `spatialEventTrigger`: A location-based trigger that reminds the user to complete the task.
- `temporalEventTrigger`: A time-based trigger that reminds the user to complete the task.
- `createdDateComponents`: The date on which the task was initially created.
- `modifiedDateComponents`: The last date on which the task was updated.
- `identifier`: The unique identifier that your app uses to identify the task.
- `priority`: The priority for the task.

## Return Value

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

## See Also

### Initializing a Task Object

- [init(title:status:taskType:spatialEventTrigger:temporalEventTrigger:createdDateComponents:modifiedDateComponents:identifier:)](intents/intask/init(title:status:tasktype:spatialeventtrigger:temporaleventtrigger:createddatecomponents:modifieddatecomponents:identifier:).md)
