Intents Extension is an iOS extension that allows third-party apps to process Siri voice commands and interact with system services through SiriKit. The app defines its own intents in Intents.intentdefinition, implements handlers based on INIntentHandler, and registers them for voice phrase recognition. According to Apple Developer Documentation (2025), SiriKit supports over 20 intent domains — from messaging and payments to workouts and bookings — and since iOS 14, support for custom intents has been added via IntentsExtension.
Key Takeaways
Intents Extension is an app extension that allows Siri, Shortcuts, and other system services to invoke app functionality through the standardized INIntentHandler protocol. When a user says “Hey Siri, send a message in Messenger X”, Siri activates the corresponding extension, passes the request parameters, and receives the result for voicing.
Unlike other types of extensions, Intents Extension runs in the background without a visible interface — Siri displays the response via voice or a text card. The extension can optionally provide a custom UI through INUIHostedViewProviding, which is displayed inside Siri before executing a command for confirmation.
The extension does not have access to the device screen and cannot initiate actions on its own — only in response to a request from Siri or Shortcuts. This ensures security: the user always controls which actions the app performs via voice commands.
SiriKit is Apple’s framework for Siri integration, introduced in iOS 10. It defines domains — categories of actions that Siri can handle: messaging, phone calls, payments, lists, reminders, photos, workouts, bookings, and others. Each domain has a fixed set of intents and responses.
INSendMessageIntent — sending messages. INStartWorkoutIntent — starting a workout. INSearchForPhotosIntent — searching photos. INRequestRideIntent — booking a ride. Each domain defines required and optional parameters that Siri extracts from the voice request. According to Apple, standard domains do not require an intentdefinition file — implementing the corresponding handler is sufficient.
For apps that do not fit into standard domains, iOS 14 introduced the ability to use custom intents. The app defines its own command types and their parameters through Intents.intentdefinition, and Siri learns to recognize the corresponding phrases based on examples provided by the developer.
The Intents Extension is registered via the IntentsSupported key in Info.plist, which lists all intent classes that the extension handles. Siri uses this list to select the appropriate extension when recognizing a voice command. If multiple extensions support the same intent, Siri prompts the user to choose.
class MessageIntentHandler: NSObject,
INSendMessageIntentHandling {
func handle(
intent: INSendMessageIntent,
completion: @escaping
(INSendMessageIntentResponse) -> Void
) {
let response = INSendMessageIntentResponse(
code: .success, userActivity: nil)
completion(response)
}
}
INIntentHandler is a protocol that defines methods for handling each stage of intent processing: parameter resolution, confirmation, and execution. The extension implements these methods for each intent type it supports.
resolve — validation and clarification of intent parameters. Siri calls this method for each parameter. If a parameter is missing or incorrect, the extension returns a clarification request, and Siri asks the user an additional question. confirm — confirmation of the intention. The extension checks whether it can execute the intent in the current context. handle — actual execution of the operation and returning the result.
The three-stage separation is critical for voice UX: if a parameter is not recognized, Siri does not execute the action but asks for clarification instead. For example, if the user said “Send a message to Alex” but there are three Alexes in contacts — the extension returns a resolve with a clarification request, and Siri asks “Which Alex?”
INIntentResponse is an object that the extension returns in the completion handler after executing the intent. The response contains a result code (success, failure, requiresAuthentication, inProgress) and optional data for Siri to voice. The code determines how Siri responds: success — voice confirmation, failure — error message, inProgress — indication of a long-running operation.
func resolve(
for intent: INSendMessageIntent,
with completion: @escaping
(INStringResolutionResult) -> Void
) {
if let text = intent.content, !text.isEmpty {
completion(.success(with: text))
} else {
completion(.needsValue())
}
}
With iOS 14, developers gained the ability to define custom intents outside the standard SiriKit domains. Custom intents are described in the Intents.intentdefinition file — a visual editor inside Xcode where new command types with parameters and responses are created.
Each custom intent consists of INIntent (request definition) and INIntentResponse (response definition). INIntent contains parameters with data types — String, Integer, CurrencyAmount, found objects, and others. INIntentResponse contains properties for returning results and an array of response codes. Xcode automatically generates Swift classes based on this definition.
Apple recommends including no more than 5 parameters in a custom intent — excessive parameters degrade voice recognition and complicate the user experience. For each parameter, it is advisable to provide example phrases in the Assistant Dialog so that Siri learns to recognize them correctly.
In Intents.intentdefinition, for each intent you can specify example sentences — phrases the user will say to Siri to activate the intent. Examples: “Order coffee in MyApp”, “Ask MyApp to find a pizza recipe”. Siri uses these phrases for recognition training and suggests them to the user when setting up Shortcuts.
// Intents.intentdefinition (visual editor)
Intent: OrderCoffeeIntent
Parameters:
- beverage (String)
- size (String)
- quantity (Integer)
Response:
- orderNumber (String)
- price (CurrencyAmount)
Phrases:
- "Order coffee in MyApp"
- "Get a latte from MyApp"
INUIHostedViewProviding is a protocol that allows Intents Extension to show a custom interface inside Siri before executing a command. For example, when booking a ride, the extension can display a map with the route and cost, and the user confirms the action by tapping.
The protocol defines the method configure(with:for:completion:), where the extension receives the intent and returns a UIViewController to be embedded in Siri. The controller size is limited — maximum height 200 points. It is recommended to use compact cards with key information: amount, time, address.
The custom interface is optional — if the extension does not implement INUIHostedViewProviding, Siri displays a standard card with the intent type and app name. For most intents, the standard UI is sufficient, and Apple recommends adding a custom interface only when it truly improves comprehension — for example, to display a route or confirm a payment.
For intents related to finances or personal data, authentication is required. INIntentResponse supports the requiresAuthentication code, which forces Siri to request Face ID or Touch ID before execution. After authentication, the extension receives confirmation through a separate handle call, where the authentication status is checked.
Apple specifically emphasizes: Intents Extension should not request its own password or biometrics — system authentication is used. Storing access tokens in Keychain with shared access between the app and extension is standard practice for long-lived sessions.
class IntentViewController: UIViewController {
func configure(
with intent: INIntent,
completion: @escaping
(UIViewController?) -> Void
) {
let cardView = ConfirmationCardView()
let hostingController =
UIHostingController(rootView: cardView)
completion(hostingController)
}
}
Frequently Asked Questions
Yes, the extension can process intents from the Shortcuts app without voice input. The user creates a shortcut from the suggested actions, and the extension executes it without Siri’s involvement.
Custom intents are available from iOS 14 and later. For iOS 10–13, only standard SiriKit domains are available. Custom intents require Intents.intentdefinition and Swift class generation.
Siri waits for the extension’s response for about 15 seconds. If the limit is exceeded, Siri notifies the user that the action could not be completed. For long-running operations, use the inProgress response code.
Use Keychain with shared access via an access group between the main app and the extension. App Group shared UserDefaults is an alternative but inferior to Keychain in security.
Intents Extension handles the logic — resolve, confirm, handle. Intents UI Extension provides a custom interface for display inside Siri via INUIHostedViewProviding. Both can work together.
Summary
We will develop a mobile application turnkey
IT Sectr creates iOS and Android applications for startups and businesses since 2017. We will advise you and propose the best solution.
Read also