Class

INAddTasksIntent

A request to add tasks to a task list.

Declaration

class INAddTasksIntent : INIntent

Overview

Siri creates an INAddTasksIntent object when the user asks to add tasks to an existing task list. (If the user asks to create a note and none of your Intents app extensions declare support for the INCreateNoteIntent class, SiriKit uses this intent as a substitute.) The intent object can contain the set of tasks to add and the target task list. The intent may also include location- or time-based triggers to assign to each of the new tasks.

To handle this intent, the handler object in your Intents extension must adopt the INAddTasksIntentHandling protocol. Your handler should confirm the request and create an INAddTasksIntentResponse object with the updated task information.

For a list of other intents in the lists and notes domain, see INNotebookDomainHandling.

Additional Intent Attributes

Table 1 lists additional attributes of this intent object.

Table 1

Add task intent attributes

Attribute

Description

Supported by

Siri

Always requires unlocked device

No

Example Phrases

There are many ways in which users can ask Siri to add tasks to a task list. Table 2 provides a few sample phrases in different languages. You can use these phrases during testing to trigger your intents. This list is not exhaustive and Siri may recognize many other phrases.

Table 2

Siri phrases that trigger the addition of a task to a task list

Locale

Example 1

Example 2

en

Add persimmons to my shopping list

Remind me to buy dog food

zh_CN

在我的购物列表里添加柿子

提醒我买狗食

zh_HK

喺我嘅購物清單入面加入柿餅

提醒我買狗糧

zh_TW

新增柿子到我的購物清單

提醒我要買狗食

yue_CN

喺我嘅购物清单入面加入柿饼

提醒我买狗粮

ar

أضف الخوخ إلى قائمة التسوق

ذكرني بشراء طعام للكلب

da

tilføj sharonfrugt til min indkøbsliste

mind mig om at købe hundemad

de

Füge Äpfel zu meiner Einkaufsliste hinzu

Erinnere mich daran Hundefutter kaufen

es

Añade melocotones a la lista de la compra

Recuérdame comprar comida de perro

fi

Lisää ostoslistaan banaaneja

Muistuta että ostan koiranruokaa

fr

Ajoute kiwi à ma liste de courses

Rappelle-moi d'acheter de la nourriture pour chien

he

תוסיפי אפרסמונים לרשימת קניות שלי

תזכירי לי לקנות אוכל לכלבים

it

Aggiungi prezzemolo alla mia lista della spesa

Ricordami di comprare cibo per cani

ja

買い物リストに柿を追加して

ドッグフードを買うのをリマインドして

ko

내 쇼핑 리스트에 단감 추가해줘

강아지 사료 사라고 미리 알려줘

ms

Tambah oren ke senarai beli-belah saya

Ingatkan saya untuk beli makanan anjing

nb

Legg til bananer i handlelista

Minn meg på å kjøpe hundemat

nl

Voeg sinaasappelen toe aan mijn boodschappenlijst

Herinner me eraan hondenvoer te kopen

pt

Adiciona tomate à minha lista de compras

Me lembre de comprar comida de cachorro

ru

Добавить хурму в список покупок

Напомни мне купить корм для собак

sv

Lägg till clementiner i min inköpslista

Påminn mig att köpa hundmat

th

เพิ่มขนมปังไปที่ลิสต์รายการซื้อของ

เตือนฉันให้ซื้ออาหารแมวด้วย

tr

Alışveriş listeme salatalık ekle

Köpek maması almamı anımsat

In the preceding examples, <appName> represents the name of the app whose Intents extension handles the request.

Topics

Getting the Task Details

var targetTaskList: INTaskList?

The task list to receive the new tasks.

var taskTitles: [INSpeakableString]?

An array of strings containing the titles of the new tasks.

Getting the Trigger Information

var spatialEventTrigger: INSpatialEventTrigger?

The location-based trigger to associate with each of the new tasks.

var temporalEventTrigger: INTemporalEventTrigger?

The time-based trigger to associate with each of the new tasks.

Relationships

Inherits From

Conforms To

See Also

Add Task

protocol INAddTasksIntentHandling

The handler interface for adding tasks to a task list.

class INAddTasksIntentResponse

Your response to a request to add tasks to a task list.