SiriKit

Handle user requests for your app's services that originate from Siri or Maps.

Overview

SiriKit encompasses the Intents and Intents UI frameworks, which you use to implement app extensions that integrate your services with Siri and Maps. SiriKit supports two types of app extensions:

  • An Intents app extension receives user requests from SiriKit and turns them into app-specific actions. For example, the user might ask Siri to send a message, book a ride, or start a workout using your app.

  • An Intents UI app extension displays branding or other customized content in the Siri or Maps interface after your Intents app extension fulfills a user request. Creation of this extension is optional.

Figure 1

Making your services available from Siri and Maps

Making your services available from Siri and Maps

SiriKit defines the types of requests—known as intents—that users can make. Related intents are grouped into domains to make it clear which intents you might support in your app. For example, the messages domain has intents for sending messages, searching for messages, and marking messages as read or unread.

Your app extensions rarely communicate with the user directly. Siri and Maps typically handle all communication with the user and call out to your extensions only when they need you to provide information. You can provide an Intents UI app extension to customize the information that Siri and Maps display, but doing so is optional.

Topics

First Steps

Requesting Authorization to Use SiriKit

Request permission from the user so that Siri and Maps can communicate with your Intents app extension.

Creating an Intents App Extension

Add and configure an Intents app extension in your Xcode project.

Intents App Extension

The Intents app extension provides your response to user requests originating from Siri and Maps.

Structuring Your Code to Support App Extensions

Move your back-end services to a private framework so that they can be used by your app and your app extensions.

Dispatching Intents to Handler Objects

Provide SiriKit with an object capable of handling a given intent.

Resolving and Handling Intents

Resolve, confirm, and handle user requests for your app's services.

protocol INIntentHandlerProviding

The interface for dispatching intents to the custom objects that handle those intents.

Extension-Related Classes

Learn about the classes you use to build your Intents extension.

Intent Domains

SiriKit groups intents into domains based on the type of app that is likely to support them.

VoIP Calling

Initiate calls and search the user's call history.

Messaging

Send messages and search the user's received messages.

Payments

Send payments between users or pay bills.

Lists and Notes

Create and manage notes and to-do list items.

Visual Codes

Convey contact and payment information using Quick Response (QR) codes.

Photos

Search for and display photos.

Workouts

Start, end, and manage fitness routines.

Ride Booking

Book rides and report their status.

Car Commands

Manage vehicle door locks and get the vehicle's status.

CarPlay

Interact with a vehicle's CarPlay system.

Restaurant Reservations

Create and manage restaurant reservations with help from the Maps app.

Common Objects

Common data types such as strings and numerical types are used throughout SiriKit.

Common Data Types

Manage common data types such as strings, dates, currencies, images, and contacts.

Common Resolution Results

Resolve common types of data like strings and dates into specific values that your app recognizes.

Intent Class Identifiers

Identify intents specified by user notifications.

Vocabulary

Define the app-specific terms that users can speak when making requests through Siri.

Registering Custom Vocabulary with SiriKit

Register your app's custom terminology, and provide sample phrases for how to use your app with Siri.

class INVocabulary

An object for registering user-specific vocabulary that might be included in Siri requests.

Custom UI

Creating an Intents UI Extension

Create an Intents UI app extension to customize the interfaces displayed by Siri and Maps.

protocol INUIHostedViewControlling

Methods for presenting custom content in the Siri and Maps interfaces.

protocol INUIHostedViewSiriProviding

Methods for hiding portions of the default interfaces that Siri provides.

class INParameter

A parameter of an interaction object.

Beta

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software