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 6-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.
User intention |
Objects |
|---|---|
Start an audio call |
Handler:
Intent:
Response: |
Start a video call |
Handler:
Intent:
Response: |
Search the user’s call history |
Handler:
Intent:
Response: |
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 6-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.
User intention |
Objects |
|---|---|
Send a message |
Handler:
Intent:
Response: |
Search for messages |
Handler:
Intent:
Response: |
Set attributes on a message |
Handler:
Intent:
Response: |
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. Table 6-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.
User intention |
Objects |
|---|---|
Send a payment to another user |
Handler:
Intent:
Response: |
Request a payment from another user |
Handler:
Intent:
Response: |
If you use a single handler object to support both 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 6-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.
User intention |
Objects |
|---|---|
Search for photos |
Handler:
Intent:
Response: |
Play a photo slideshow |
Handler:
Intent:
Response: |
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 6-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.
User intention |
Objects |
|---|---|
Start a workout |
Handler:
Intent:
Response: |
Pause a workout |
Handler:
Intent:
Response: |
Resume a workout |
Handler:
Intent:
Response: |
End a workout |
Handler:
Intent:
Response: |
Cancel a workout |
Handler:
Intent:
Response: |
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 6-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.
User intention |
Objects |
|---|---|
Get a list of available rides (Maps only) |
Handler:
Intent:
Response: |
Book a ride |
Handler:
Intent:
Response: |
Get the status of a booked ride |
Handler:
Intent:
Response: |
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.
CarPlay
Automotive manufacturers with iOS apps for managing their vehicles may use CarPlay intents so that users can manage vehicle environments through Siri. Table 6-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.
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 6-8 lists the types of intents you can implement and the classes and protocols to support in your Intents extension.
Creating an Intents UI Extension
Copyright © 2016 Apple Inc. All rights reserved. Terms of Use | Privacy Policy | Updated: 2016-09-13
