Class

INSearchForPhotosIntent

A request for the list of photos that match the specified criteria.

Declaration

@interface INSearchForPhotosIntent : INIntent

Overview

The system creates an INSearchForPhotosIntent object when the user asks to search for photos in an app. The intent object contains the parameters to use during the search, including the possible name of a photo album, the people in the photos, or the location of the photos. Use this intent object to validate the search parameters and to begin the search process. When performing the search, use only the provided parameters and ignore any that have no values.

To handle this intent, the handler object in your Intents extension must adopt the INSearchForPhotosIntentHandling protocol. Your handler should confirm the request and create an INSearchForPhotosIntentResponse object with the results of the search. For successful searches, Siri offers the user a way to launch your app and see the results.

For a list of other intents in the photos domain, see INPhotosDomainHandling.

Additional Intent Attributes

Table 1 lists additional attributes of this intent object.

Table 1

Photo search intent attributes

Attribute

Description

Supported by

Siri Intents

Always requires unlocked device

Yes

Example Phrases

Users can ask Siri to search for photos in a variety of ways. Table 2 provides a few sample phrases in different languages. You can use these phrases during testing to trigger your intents. This list isn’t exhaustive and Siri may recognize many other phrases.

Table 2

Siri phrases that trigger the searching of photos

Locale

Example 1

Example 2

en

Look for beach photos taken last summer in <appName>

zh_CN

打开<appName>给我看上周末拍的照片

查看我上周末用<appName>拍的照片

zh_HK

<appName>搵吓上個禮拜影嘅相

睇吓上禮拜用<appName>影嘅相

zh_TW

<appName>找上週末拍的照片

搜尋上星期在海灘拍的<appName>相片

yue_CN

去<appName>揾吓上个礼拜影嘅相

睇吓上礼拜用<appName>影嘅相

ar

مستعملا <appName> اعثر على صور أشجار

da

åben beans og vis mig billeder jeg tog på island sidste måned

vis mig billeder jeg tog i sidste weekend på island med photos proto

de

Suche Fotos vom Strand von letztem Sommer in <appName>

Suche meine Fotos aus Tokio auf <appName>

es

Muéstrame las fotos que tomé en la playa el verano pasado usando <appName>

Busca mis fotos de Tokio en <appName>

fi

Etsi viime kesänä otettuja rantakuvia <appName>ssa

Hae <appName>n rantakuvia eiliseltä

fr

affiche-moi les photos de plages de l'été dernier que j'ai prises avec <appName>

Montre-moi avec <appName> les photos de l'année dernière de la plage

he

באמצעות <appName> תראה לי תמונות שצילמתי שבוע שעבר בסן חוזה

באמצעות <appName> תראה את אלבום התמונות הוואי

it

Cerca foto sulla spiaggia scattate la scorsa estate in <appName>

Mostra le mie foto di Parigi in <appName>

ja

<appName>で去年の夏に撮った写真を探して

去年の夏に撮った写真を<appName>で見せて

ko

<appName>에서 작년에 찍은 해변 사진 찾아줘

<appName>에서 올해 찍은 공원 사진 찾아줘

ms

Cari gambar yang saya ambil di Malaysia pada bulan ini dalam <appName>

Tunjukkan foto yang saya ambil minggu lepas di KLCC dengan <appName>

nb

Finn bilder av strender fra i fjor i <appName>

Finn bilder av mitt bryllup i Bergen med <appName>

nl

Zoek naar strand foto's die vorige zomer zijn genomen in <appName>

Vind op <appName> foto's van mijn bruiloft in Breda

pt

Procure fotos de praia que tirei semana passada no <appName>

Acha as fotos de ontem à noite usando <appName>

ru

С помощью <appName> покажи мне фотографии которые я сделала в Санкт Петербурге на прошлой неделе

Покажи мне фотографии которые я сделал на прошлых выходных в Исландии с помощью <appName>

sv

Använd <appName> och visa mig strandbilder från förra veckan

Öppna <appName> och visa mig bilder på hundar som jag tog förra månaden

th

แสดงรูปที่ฉันถ่ายเมื่อสัปดาห์ที่แล้วที่ San Jose ใน <appName>

หารูปถ่ายที่ทะเลปีที่แล้วใน <appName>

tr

İstanbul'da geçen hafta <appName>'la çektiğim fotoğrafları göster

<appName> kullanarak İstanbul'da geçen hafta çektiğim fotoğrafları göster

In Table 2, <appName> represents the name of the app whose Intents extension initiates the search. If your app uses custom photo album names, photo tags, or contact names, you can tell Siri about those names using the INVocabulary class.

Topics

Creating the Intent Object

- initWithDateCreated:locationCreated:albumName:searchTerms:includedAttributes:excludedAttributes:peopleInPhoto:

Initializes a search for photos intent object with the specified search parameters.

Getting the People in the Photos

peopleInPhoto

The people identified in the photos.

peopleInPhotoOperator

The operator that defines how to search for people in the photos.

Getting the Search Terms

searchTerms

An array of terms to look for in the photos.

searchTermsOperator

The operator that defines how to incorporate the search terms when performing the search.

Getting the Search Attributes

dateCreated

The range of dates during which someone took the pictures.

locationCreated

The location where someone took the photos.

albumName

The name of the album that contains the photos.

includedAttributes

The attributes that must be present in the photos.

excludedAttributes

The attributes that must not be present in the photos.

INPhotoAttributeOptions

Constants indicating attributes of a photo.

Relationships

Inherits From

See Also

Search for Photos

Searching for Photos

Use SiriKit to search for photos managed by your app.

INSearchForPhotosIntentHandling

The handler interface for searching the user’s photos.

INSearchForPhotosIntentResponse

Your app’s response to a search for photos intent.