Siri Shortcuts Integration Development for iOS
Siri Shortcuts allows users to run actions from your application by voice or through automations in the Shortcuts application. Since iOS 16 and the App Intents framework, this has become significantly easier—and simultaneously new capabilities that broke the old NSUserActivity/Intent approach.
App Intents vs SiriKit Intents: What to Choose
Before iOS 16—SiriKit with .intentdefinition file, code generation, and INExtension. Complex, lots of boilerplate.
Since iOS 16—AppIntents framework. A structure implementing AppIntent is automatically available to Siri, Spotlight, and the Shortcuts application. No extension targets, no code generation.
struct OrderCoffeeIntent: AppIntent {
static var title: LocalizedStringResource = "Order Coffee"
static var description = IntentDescription("Creates an order in the application")
@Parameter(title: "Drink", default: "Espresso")
var drinkName: String
func perform() async throws -> some IntentResult & ProvidesDialog {
let order = try await CoffeeService.shared.placeOrder(drink: drinkName)
return .result(dialog: "Order for \(drinkName) accepted, number \(order.id)")
}
}
This Intent immediately appears in Siri, Spotlight, and the Shortcuts application. No additional registration needed.
Parameters and Entity
If a parameter is not a simple string but an entity from your application (product, contact, route), you need an AppEntity. It allows Siri to request user clarification via dialog.
struct CoffeeItem: AppEntity {
static var typeDisplayRepresentation = TypeDisplayRepresentation(name: "Drink")
static var defaultQuery = CoffeeItemQuery()
var id: String
var displayRepresentation: DisplayRepresentation { .init(title: "\(name)") }
var name: String
}
AppEntityQuery with the entities(matching:) method allows Siri to search entities by text. The user says "Order a large cappuccino"—Siri requests a list of cappuccinos from the app and offers to choose.
Errors That Break Siri Integration
perform() throws an error without handling. If perform() throws, Siri shows a default message "Something went wrong" without details. Correct: throw AppIntentError with a custom message or return result(dialog:) describing the error.
Long execution without feedback. perform() must complete in reasonable time (up to 30 seconds). For long operations—intermediate dialog through requestConfirmation(). Without it, Siri just hangs waiting with a spinner.
Loss of authorization in Extension. INExtension (old approach) runs in a separate process. If the authorization token is stored in Keychain without kSecAttrAccessible: kSecAttrAccessibleAfterFirstUnlock, the Extension won't get access when the phone is locked. App Intents run in the main application process—this issue is less acute, but Keychain access group still needs configuring.
App Shortcuts (Siri Tips)
Since iOS 16.4, you can define AppShortcutsProvider—ready-made phrases that work without user setup:
struct CoffeeAppShortcuts: AppShortcutsProvider {
static var appShortcuts: [AppShortcut] {
AppShortcut(
intent: OrderCoffeeIntent(),
phrases: ["Order coffee at \(.applicationName)", "I want coffee in \(.applicationName)"],
shortTitle: "Order coffee",
systemImageName: "cup.and.saucer"
)
}
}
The phrase \(.applicationName) is mandatory—without the application name, Siri can't route the command uniquely. Apple verifies this in review.
Testing
Simulator + Siri works only with real voice or through XCTest with INUIAddVoiceShortcutButton. Better to test on real device. For App Intents: Settings → Siri & Search → [app] shows registered intents.
Timeline
Basic integration 2–3 App Intents without Entity: 2–4 weeks. Full integration with AppEntity, App Shortcuts, custom dialogs: 5–8 weeks. Migration from old SiriKit to App Intents: 3–6 weeks depending on volume. Cost is calculated after auditing existing integration.







