<!--
{
  "availability" : [
    "iOS: 13.0.0 - 27.0.0",
    "iPadOS: 13.0.0 - 27.0.0",
    "macCatalyst: 13.1.0 - 27.0.0",
    "visionOS: 1.0.0 - 27.0.0",
    "watchOS: 6.0.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SiriKit",
  "identifier" : "/documentation/Intents/INTask/init(title:status:taskType:spatialEventTrigger:temporalEventTrigger:createdDateComponents:modifiedDateComponents:identifier:priority:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Intents"
    ],
    "preciseIdentifier" : "c:objc(cs)INTask(im)initWithTitle:status:taskType:spatialEventTrigger:temporalEventTrigger:createdDateComponents:modifiedDateComponents:identifier:priority:"
  },
  "title" : "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.

```
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

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

---

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)