Contents

initWithTasks:nextTriggerTime:all:

Initializes the intent object with information about the tasks to snooze and when to snooze them.

Declaration

- (instancetype) initWithTasks:(NSArray<INTask *> *) tasks nextTriggerTime:(INDateComponentsRange *) nextTriggerTime all:(NSNumber *) all;

Parameters

  • tasks:

    An array of tasks to snooze.

  • nextTriggerTime:

    The next time to trigger a snooze.

  • all:

    A Boolean value indicating whether to snooze all of the tasks.

Return Value

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

Discussion

Normally, you don’t 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.