init(targetTask:taskTitle:status:priority:spatialEventTrigger:temporalEventTrigger:)
init(targetTask:taskTitle:status:priority:spatialEventTrigger:temporalEventTrigger:)
init(targetTask:taskTitle:status:priority:spatialEventTrigger:temporalEventTrigger:) Initializer of INSetTaskAttributeIntent Initializes the intent object with information about the task and the changes that you want to make.
init(targetTask: INTask?, taskTitle: INSpeakableString?, status: INTaskStatus, priority: INTaskPriority, spatialEventTrigger: INSpatialEventTrigger?, temporalEventTrigger: INTemporalEventTrigger?)Parameters
targetTask
The task that you want to modify.
taskTitle
The title for the task.
status
The new status for the task.
priority
The priority for the task.
spatialEventTrigger
The location-based trigger, if any, that you want to apply to the task.
temporalEventTrigger
The time-based trigger, if any, that you want to apply to the task.
Return Value
An initialized intent object or nil if the object could not be created.
Discussion
Normally, you do not 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 in order to validate your intent handling code paths.