Class

INSearchForMediaIntent

A request to search for a media item.

Declaration

class INSearchForMediaIntent : INIntent

Overview

Siri creates an INSearchForMediaIntent object when the user asks to search for a media item. The intent object contains the media for which to search.

To handle this intent, the handler object in your Intents extension must adopt the INSearchForMediaIntentHandling protocol. Your handler should confirm the request and create an INSearchForMediaIntentResponse object with the media to search for.

Additional Intent Attributes

Table 1 lists additional attributes of this intent object.

Table 1

Search media intent attributes

Attribute

Description

Supported by

Siri Intents (audio only)

Always requires unlocked device

No

Example Phrases

Users can ask Siri to search for media 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 searching for media

Locale

Example 1

Example 2

en

Find Drake on <appName>

Show me Billie Eilish on <appName>

zh_CN

在<appName>上查找Drake

在<appName>上查看Billie Eilish

zh_HK

喺<appName>入邊搵Drake

喺<appName>入邊搵Billie Eilish

zh_TW

在<appName>上面尋找Drake

我想在<appName>上面看Billie Eilish

yue_CN

喺<appName>入边揾Drake

喺<appName>入边揾Billie Eilish

ar

da

Find Drake på <appName>

Vis mig Billie Eilish på <appName>

de

Suche Drake auf <appName>

Zeige mir Billie Eilish auf <appName>

es

Busca Drake en <appName>

Muéstrame Shakira en <appName>

fi

Etsi Drake <appName>

Näytä Billie Eilish <appName>

fr

Cherche Drake sur <appName>

Affiche-moi Billie Eilish sur <appName>

he

it

Cerca Drake su <appName>

Mostrami Billie Eilish su <appName>

ja

<appName>でDrakeの曲を探して

<appName>でビリー·アイリッシュを探して

ko

<appName>에서 Drake 찾아줘

<appName>에서 Billie Eilish 보여줘

ms

Carikan Drake pada <appName>

Tunjukkan saya Billie Elish di <appName>

nb

Finn Drake i <appName>

Vis meg Billie Eilish i <appName>

nl

Vind Drake op <appName>

Toon me Billie Eilish op <appName>

pt

Encontre Drake no <appName>

Me mostra Ivete Sangalo no <appName>

ru

Найти Дрейк в VK

Найди мне Атрура Пирожкова в Яндекс Музыке

sv

Hitta Madonna på <appName>

Visa mig Billie Eilish på <appName>

th

หา Drake บน <appName>

แสดง Billie Eilish บน <appName>

tr

<appName>'de Drake bul

<appName>'de Billie Eilish göster

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

Topics

Initializing the Intent Object

init(mediaItems: [INMediaItem]?, mediaSearch: INMediaSearch?)

Creates an intent that describes the media items for which to search and where to search for them.

Searching for Media

var mediaItems: [INMediaItem]?

The media items for which to search.

var mediaSearch: INMediaSearch?

The location to search for the media item.

Relationships

Inherits From

Conforms To

See Also

Search for Media

protocol INSearchForMediaIntentHandling

The interface that handles media search requests.

class INSearchForMediaIntentResponse

Your app’s response to a search media intent.