Contents

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

Initializes the intent object with the specified task details.

Declaration

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 Inspatialeventtrigger object that contains details of when reminders should be sent for the tasks. The trigger applies to all tasks being added.

  • temporalEventTrigger:

    An 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

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

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