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. Domains group related intents 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

Essentials

Requesting Authorization to Use SiriKit

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

Siri Entitlement

A Boolean value that indicates whether the app handles Siri requests.

Key: com.apple.developer.siri

Siri Intents

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

Creating an Intents App Extension

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

Structuring Your Code to Support App Extensions

Move your back-end services to a private framework so your app and app extensions can use them.

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.

Shortcuts

Adding User Interactivity with Siri Shortcuts and the Shortcuts App

Add custom intents and parameters to help users interact more quickly and effectively with Siri and the Shortcuts app.

Donating Shortcuts

Tell Siri about shortcuts to actions that the user performed in your app.

Deleting Donated Shortcuts

Remove your donations from Siri.

Soup Chef: Accelerating App Interactions with Shortcuts

Make it easy for people to use Siri with your app by providing shortcuts to your app’s actions.

Shortcut Management

Enable users to add shortcuts to Siri, and have your app suggest shortcuts to users.

Relevant Shortcuts

Display shortcuts on the Siri watch face.

enum INShortcut

An action available in your app that the system may suggest to a user or a user may add to Siri.

class INObject

An object that represents a custom intent parameter.

Siri Event Suggestions

Siri Event Suggestions

Provide users with current, actionable information connected to a reservation.

Siri Domains

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

Messaging

Send messages and search the user’s received messages.

Lists and Notes

Create and manage notes and to-do list items.

Workouts

Start, end, and manage fitness routines.

Payments

Send payments between users or pay bills.

VoIP Calling

Initiate calls and search the user’s call history.

Visual Codes

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

Photos

Search for and display photos.

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.

Media

Listen and control audio through Siri Intents or listen and watch media content from your app with shortcuts.

Custom Siri and Maps Displays

Creating an Intents UI Extension

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

Custom UI

Customize Siri and Map interfaces with content unique to your app.

Custom Vocabulary

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 Siri requests might include.

Common Objects

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

class INInteraction

An interaction between the user and your app involving an intent object.

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.

Deprecated Symbols

Deprecated Classes and Protocols

Symbols that are no longer supported.

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