How iOS 12 Shortcuts Integrates with Third-Party Apps
With the release of iOS 12, Apple introduced the Shortcuts app—built upon its acquisition of Workflow—to let users create customized, multi-step automations across native features and external services. This article examines the core mechanisms behind third-party integration in iOS 12, explaining how SiriKit, developer-defined intents, donated actions, and URL schemes allow external applications to become modular building blocks in user workflows.
SiriKit and Custom Intents
The foundation of third-party integration in iOS 12 lies in expanded SiriKit APIs. Prior to iOS 12, SiriKit was restricted to limited domains, such as messaging, ride-hailing, and payments. iOS 12 introduced custom intents, allowing any developer to define specific, custom capabilities within their apps.
Developers define these interactions using an
Intent Definition file within Xcode. This file
specifies:
- The action the app can perform (e.g., "Order Coffee" or "Start Timer").
- The parameters required to execute the action (e.g., coffee type, timer duration).
- Whether the action can run in the background via an app extension or requires the main app to open.
Action Donations
To make third-party actions available to the user, iOS 12 relies on a system concept called "donations." Every time a user performs an action inside a participating third-party app, the app "donates" an interaction event to iOS.
Once an action is donated, the operating system registers it across the ecosystem:
- Predictive Suggestions: iOS displays the action on the Lock screen or in Spotlight search when it anticipates the user needs it.
- Shortcuts Action Library: The donated action immediately surfaces in the Shortcuts app under the third-party app's dedicated section, allowing the user to drag and drop it into custom routines.
Parameter Handling and Data Flow
In the Shortcuts app, third-party actions are treated as modular functions capable of receiving inputs and outputting data:
- Input Consumption: Third-party actions can accept variables from preceding steps, such as clipboard contents, text, photos, or location data.
- Output Generation: If a developer configures the intent response properly, the third-party action can return results (such as text, URLs, or file objects) back into the Shortcuts flow, enabling subsequent actions to process that data.
Background Execution vs. Foreground Launching
Third-party integrations in iOS 12 operate in two distinct modes depending on how the developer configures the intent:
- Background Handling (App Extensions): Actions execute silently without switching contexts. For example, logging a glass of water into a fitness tracker can occur entirely in the background, keeping the user in the Shortcuts environment.
- Open App Actions: Tasks requiring complex user interfaces or active permissions (such as finalizing a payment or showing a map) trigger a handoff that opens the third-party application directly to a specific deep-linked view.
URL Schemes and x-callback-url
For third-party apps that did not immediately implement iOS 12 custom
intents, the Shortcuts app maintains backward compatibility through URL
schemes and the x-callback-url protocol. This enables
Shortcuts to:
- Launch an external app with custom query parameters.
- Direct the app to perform an internal command.
- Receive an automated callback returning data and focus back to the Shortcuts app.
Through these combined methods—custom intents, automated donations, and robust URL protocols—iOS 12 transformed third-party apps from isolated silos into interconnected components within personalized user automations.