Guides and Sample Code

Developer

SiriKit Programming Guide

On This Page

Intents Domains

Apps integrate with Siri or Maps through specific domains, which define categories of behaviors that an app can support. Each domain contains one or more specific intents for you to handle. You are not required to support all of the intents in a given domain, but doing so is recommended.

The Info.plist file of your Intents extension and Intents UI extension must declare the intents that they support. For information about configuring the Info.plist file of your Intents extension, see Configuring Your Xcode Project. For information about configuring the Info.plist file of your Intents UI extension, see Creating an Intents UI Extension.

VoIP Calling

Apps that offer audio or video calling for users can use intents to initiate calls and search the user’s call history. Table 7-1 lists the types of intents you can implement and the classes and protocols to support in your Intents extension. When performed on a locked device, the system automatically prompts the user to unlock the device before searching the user’s call history. Depending on how you initiate an audio or video call, the system may also ask the user to unlock the device so that it can launch your app.

Table 7-1VoIP calling intents

User intention

Objects

Start an audio call

Handler: INStartAudioCallIntentHandling protocol

Intent: INStartAudioCallIntent

Response: INStartAudioCallIntentResponse

Start a video call

Handler: INStartVideoCallIntentHandling protocol

Intent: INStartVideoCallIntent

Response: INStartVideoCallIntentResponse

Search the user’s call history

Handler: INSearchCallHistoryIntentHandling protocol

Intent: INSearchCallHistoryIntent

Response: INSearchCallHistoryIntentResponse

If you use a single handler object to support all of the call handling intents, your handler can adopt the INCallsDomainHandling protocol instead of adopting each protocol separately.

Messaging

Apps that offer messaging between users can use intents to send messages and search the user’s received messages. Table 7-2 lists the types of intents you can implement and the classes and protocols to support in your Intents extension. Messaging intents do not automatically require the user’s device to be unlocked.

Table 7-2Messaging intents

User intention

Objects

Send a message

Handler:  INSendMessageIntentHandling protocol

Intent:  INSendMessageIntent

Response:  INSendMessageIntentResponse

Search for messages

Handler: INSearchForMessagesIntentHandling protocol

Intent: INSearchForMessagesIntent

Response: INSearchForMessagesIntentResponse

Set attributes on a message

Handler: INSetMessageAttributeIntentHandling protocol

Intent: INSetMessageAttributeIntent

Response: INSetMessageAttributeIntentResponse

If you use a single handler object to support both message intents, your handler can adopt the INMessagesDomainHandling protocol instead of adopting each protocol separately.

Payments

Apps that offer user-to-user payment services can use intents to send and request payments. Apps that offer bill-paying services can use intents to pay bills. Table 7-3 lists the types of intents you can implement and the classes and protocols to support in your Intents extension. When performed on a locked device, the system automatically prompts the user to unlock the device before completing any payment-related requests.

Table 7-3Payment intents

User intention

Objects

Send a payment to another user

Handler:  INSendPaymentIntentHandling protocol

Intent:  INSendPaymentIntent

Response:  INSendPaymentIntentResponse

Request a payment from another user

Handler: INRequestPaymentIntentHandling protocol

Intent: INRequestPaymentIntent

Response: INRequestPaymentIntentResponse

Pay a bill

Handler:  INPayBillIntentHandling protocol

Intent:  INPayBillIntent

Response:  INPayBillIntentResponse

Search for bills

Handler:  INSearchForBillsIntentHandling protocol

Intent:  INSearchForBillsIntent

Response:  INSearchForBillsIntentResponse

If you use a single handler object to support all the payment intents, your handler can adopt the INPaymentsDomainHandling protocol instead of adopting each protocol separately.

Photos

Apps that manage photos can use intents to search for photos or display photos. Table 7-4 lists the types of intents you can implement and the classes and protocols to support in your Intents extension. When performed on a locked device, the system automatically prompts the user to unlock the device before completing any photos-related requests.

Table 7-4Photo intents

User intention

Objects

Search for photos

Handler:  INSearchForPhotosIntentHandling protocol

Intent:  INSearchForPhotosIntent

Response:  INSearchForPhotosIntentResponse

Play a photo slideshow

Handler:  INStartPhotoPlaybackIntentHandling protocol

Intent:  INStartPhotoPlaybackIntent

Response:  INStartPhotoPlaybackIntentResponse

If you use a single handler object to support both photos intents, your handler can adopt the INPhotosDomainHandling protocol instead of adopting each protocol separately.

Workouts

Apps that manage fitness activities can use intents to start, end, and manage workouts. Table 7-5 lists the types of intents you can implement and the classes and protocols to support in your Intents extension. When performed on a locked device, the system automatically prompts the user to unlock the device so that it can launch the workout app.

Table 7-5Workout intents

User intention

Objects

Start a workout

Handler:  INStartWorkoutIntentHandling protocol

Intent:  INStartWorkoutIntent

Response:  INStartWorkoutIntentResponse

Pause a workout

Handler:  INPauseWorkoutIntentHandling protocol

Intent:  INPauseWorkoutIntent

Response:  INPauseWorkoutIntentResponse

Resume a workout

Handler:  INResumeWorkoutIntentHandling protocol

Intent:  INResumeWorkoutIntent

Response:  INResumeWorkoutIntentResponse

End a workout

Handler:  INEndWorkoutIntentHandling protocol

Intent:  INEndWorkoutIntent

Response:  INEndWorkoutIntentResponse

Cancel a workout

Handler:  INCancelWorkoutIntentHandling protocol

Intent:  INCancelWorkoutIntent

Response:  INCancelWorkoutIntentResponse

If you use a single handler object to support all of the intents, your handler can adopt the INWorkoutsDomainHandling protocol instead of adopting each protocol separately.

Ride Booking

Apps that offer transportation services can use intents to book rides and provide information about those rides. Ride booking intents can originate from Siri or Maps, but you process ride booking intents in the same way for both. Table 7-6 lists the types of intents you can implement and the classes and protocols to support in your Intents extension. You are strongly encouraged to support all of the available intents. When performed on a locked device, the system automatically prompts the user to unlock the device before listing ride options or booking a ride. Getting the status of a booked ride does not automatically require the user’s device to be unlocked.

Table 7-6Ride request intents

User intention

Objects

Get a list of available rides (Maps only)

Handler:  INListRideOptionsIntentHandling protocol

Intent:  INListRideOptionsIntent

Response:  INListRideOptionsIntentResponse

Book a ride

Handler:  INRequestRideIntentHandling protocol

Intent:  INRequestRideIntent

Response:  INRequestRideIntentResponse

Get the status of a booked ride

Handler:  INGetRideStatusIntentHandling protocol

Intent:  INGetRideStatusIntent

Response: INGetRideStatusIntentResponse

If you use a single handler object to support all of the intents, your handler can adopt the INRidesharingDomainHandling protocol instead of adopting each protocol separately.

Car Commands

Apps that interact with the user’s car may support the car command intents. These intents let users manage their car using Siri. Table 7-7 lists the intents that you can implement and the classes and protocols to support in your Intents extension. Car command intents do not automatically require the user’s device to be unlocked.

Table 7-7Car command intents

User intention

Objects

Activate the car signals

Handler:  INActivateCarSignalIntentHandling protocol

Intent:  INActivateCarSignalIntent

Response:  INActivateCarSignalIntentResponse

Get the status of the car’s locks

Handler:  INGetCarLockStatusIntentHandling protocol

Intent:  INGetCarLockStatusIntent

Response:  INGetCarLockStatusIntentResponse

Set the status of the car’s locks

Handler:  INSetCarLockStatusIntentHandling protocol

Intent:  INSetCarLockStatusIntent

Response:  INSetCarLockStatusIntentResponse

Get the current fuel or power level

Handler:  INGetCarPowerLevelStatusIntentHandling protocol

Intent:  INGetCarPowerLevelStatusIntent

Response:  INGetCarPowerLevelStatusIntentResponse

If you use a single handler object to support all of the car commands intents, your handler can adopt the INCarCommandsDomainHandling protocol instead of adopting each protocol separately.

CarPlay

Automotive manufacturers with apps for managing their vehicles may use CarPlay intents so that users can manage vehicle environments through Siri. Table 7-7 lists the intents that you can implement and the classes and protocols to support in your Intents extension. CarPlay intents do not automatically require the user’s device to be unlocked.

Table 7-8CarPlay intents

User intention

Objects

Change the audio source

Handler: INSetAudioSourceInCarIntentHandling protocol

Intent: INSetAudioSourceInCarIntent

Response: INSetAudioSourceInCarIntentResponse

Change the climate control settings

Handler: INSetClimateSettingsInCarIntentHandling protocol

Intent: INSetClimateSettingsInCarIntent

Response: INSetClimateSettingsInCarIntentResponse

Change the defroster settings

Handler: INSetDefrosterSettingsInCarIntentHandling protocol

Intent: INSetDefrosterSettingsInCarIntent

Response: INSetDefrosterSettingsInCarIntentResponse

Saving vehicle settings to a profile

Handler: INSaveProfileInCarIntentHandling protocol

Intent: INSaveProfileInCarIntent

Response: INSaveProfileInCarIntentResponse

Restoring vehicle settings from a profile

Handler: INSetProfileInCarIntentHandling protocol

Intent: INSetProfileInCarIntent

Response: INSetProfileInCarIntentResponse

Change the seat temperature

Handler: INSetSeatSettingsInCarIntentHandling protocol

Intent: INSetSeatSettingsInCarIntent

Response: INSetSeatSettingsInCarIntentResponse

Change the radio station

Handler: INSetRadioStationIntentHandling protocol

Intent: INSetRadioStationIntent

Response: INSetRadioStationIntentResponse

If you use a single handler object to support all of the call handling intents, your handler can adopt the INCarPlayDomainHandling and INRadioDomainHandling protocols instead of adopting each protocol separately.

Restaurant Reservations

Apps that support making restaurant reservations can use intents to create and manage user reservations. Users make reservations only through the Maps app, which works with the Intents extension of specific apps to resolve any requests. Table 7-9 lists the types of intents you can implement and the classes and protocols to support in your Intents extension.

Table 7-9Restaurant reservation intents

User intention

Objects

Get the user’s current restaurant reservations. (Maps only)

Handler:  INGetUserCurrentRestaurantReservationBookingsIntentHandling protocol

Intent:  INGetUserCurrentRestaurantReservationBookingsIntent

Response:  INGetUserCurrentRestaurantReservationBookingsIntentResponse

Get information about the user to associate with a booking. (Maps only)

Handler:  INGetRestaurantGuestIntentHandling protocol

Intent:  INGetRestaurantGuestIntent

Response:  INGetRestaurantGuestIntentResponse

Get default values to use when requesting reservation times. (Maps only)

Handler:  INGetAvailableRestaurantReservationBookingDefaultsIntentHandling protocol

Intent:  INGetAvailableRestaurantReservationBookingDefaultsIntent

Response:  INGetAvailableRestaurantReservationBookingDefaultsIntentResponse

Get the reservation times that are currently available. (Maps only)

Handler:  INGetAvailableRestaurantReservationBookingsIntentHandling protocol

Intent:  INGetAvailableRestaurantReservationBookingsIntent

Response:  INGetAvailableRestaurantReservationBookingsIntentResponse

Book a reservation for the user. (Maps only)

Handler: INBookRestaurantReservationIntentHandling protocol

Intent:  INBookRestaurantReservationIntent

Response: INBookRestaurantReservationIntentResponse