Shortcut: what it is, iOS automation scenarios

Author: IT Sectr Published: 2026-02-15 Reading time: 9 min

Shortcut is an automation scenario in the Shortcuts app from Apple, linking actions of multiple apps and services without writing code. Shortcuts are launched by voice via Siri, on a schedule, when entering or leaving a geofence, by tapping a widget or touching an NFC tag. The scenario is created visually through the Actions builder by dragging and dropping blocks. For more details, see the Shortcuts User Guide.

Key Takeaways

  • Shortcut — an automation scenario linking app actions without code
  • Shortcuts app — a visual builder with Action blocks for iOS and iPadOS
  • Siri integration — Shortcuts are launched by voice using a user-defined phrase
  • Triggers — time, geofence, NFC, widget, app opening, and focus modes
  • App Intents — a framework for adding third-party app Actions to Shortcuts

What is a Shortcut — an automation scenario?

Shortcut is a sequence of actions (Actions) combined into a single scenario for automating tasks on iOS, iPadOS, macOS, and watchOS. Unlike a regular app, a Shortcut has no permanent interface — it runs in the background or shows quick dialogs only for data input. The user creates a scenario in the Shortcuts app by combining blocks from the Actions gallery and launches it with a single tap, by voice, or automatically via a trigger.

Shortcuts app — a built-in automation builder from Apple, available on all devices with iOS 13+, iPadOS, macOS 12+ and watchOS. The Actions library includes over 300 built-in blocks: system (send message, call, open app), media (photos, music, podcasts), internet (REST API via Get Contents of URL), file and document handling. The gallery contains ready-made scenarios from Apple and the community — from sending ETA to a contact to batch renaming files.

Actions Library is expanded by third-party apps through the App Intents framework. The developer registers intents in Intents.intentdefinition, and they automatically appear in the Shortcuts gallery. For example, Things 3 adds Actions «Create Task» and «Show Today's Tasks», while CARROT Weather adds «Today's Forecast» with location parameters.

How Shortcuts work on iOS

Shortcuts operates within the iOS sandbox — the scenario runs in a background process called shortcuted with limited permissions. Each Action is a call to a predefined handler that receives input parameters, performs the operation, and returns a result. The system passes the output of one Action as input to the next via a pipeline — the user sees this as blue connection points between blocks in the editor.

Execution flow of a Shortcut is linear: Actions run sequentially from top to bottom. Conditional branches are implemented using If blocks — the system evaluates the condition and executes the corresponding branch. Loops are available: Repeat (repeat N times), Repeat with Each (iterate over list items), and For Each. An error in one Action interrupts the entire scenario unless a Try/Catch block is added.

swift
import Intents

class OrderCoffeeIntentHandler: NSObject, OrderCoffeeIntentHandling {
    func handle(intent: OrderCoffeeIntent,
                completion: @escaping (OrderCoffeeIntentResponse) -> Void) {
        let order = Order(coffee: intent.coffee, size: intent.size)
        placeOrder(order) { success in
            let response = success
                ? OrderCoffeeIntentResponse.success(coffee: intent.coffee)
                : OrderCoffeeIntentResponse.failure(error: "Order failed")
            completion(response)
        }
    }
}

Each Intents handler is registered in Info.plist via the INIntentsSupported key. When a Shortcut is launched through Siri, the system finds the appropriate IntentHandler and executes it asynchronously. The response is returned as an INIntentResponse object containing a status, message, and optional data for display to the user.

Creating scenarios in the Shortcuts app

Creating a Shortcut starts by tapping «+» in the Shortcuts app gallery. The user selects Actions from categories: Apps, Scripting, Web, Files, Health, Music, and others. Each Action is configurable — input fields, toggles, lists. After assembling, the scenario is tested with the Play button, and the problematic block is highlighted if errors occur. For sharing, the Shortcut is exported as a .shortcut file for sending via AirDrop or iMessage.

Variables and Magic Shortcuts supports variables — output data from one Action can be passed to another. Magic Variables are determined automatically: if the previous Action returns an image, the system suggests it in the next Action's parameters. The user can also create named variables via the Set Variable block and use them anywhere in the scenario.

swift
import AppIntents

struct CreateTaskIntent: AppIntent {
    static var title: LocalizedStringResource = "Create Task"
    static var description = IntentDescription(
        "Creates a new task in your to-do list"
    )

    @Parameter(title: "Task Title")
    var taskTitle: String

    func perform() async throws -> some IntentResult {
        let task = TaskModel(title: taskTitle)
        try await Database.shared.save(task)
        return .result(dialog: "Task created")
    }
}

App Intents is a modern framework from Apple (iOS 16+, SwiftUI) that replaced Intents for custom intents. Unlike the old SiriKit, App Intents works without the Objective-C runtime, supports asynchrony via async/await, and automatically generates Siri dialogs. A struct CreateTaskIntent is marked with the AppIntent protocol, and parameters are marked with the @Parameter attribute. The framework automatically creates an Action in the Shortcuts gallery.

Launch triggers and system integration

Shortcuts triggers are conditions under which a scenario launches automatically. Configuration is done on the Automation tab in the Shortcuts app. Triggers are divided into personal (time, location, charging), sensor-based (NFC, shake), system (app opening, focus mode, CarPlay connection), and event-based (receiving an email, calendar event, notification). Each trigger can be set to run immediately or require confirmation.

TriggerLaunch conditionUsage example
TimeSpecific time, sunrise/sunsetEnable Do Not Disturb at 10:00 PM
GeofenceEntering or leaving an areaSend «Heading home» when leaving work
NFCTouching an NFC tagLaunch «Smart Home» scenario when tapping a tag
AppOpening or closing an appRemind to turn off the timer when closing YouTube
FocusFocus mode changeEnable dark theme when Sleep Focus activates
ChargingPower connect/disconnectOpen charging widget when connecting MagSafe

Automation is a key feature of Shortcuts, unavailable to regular apps without developer privileges. The user sets up a trigger once and forgets about it — the scenario runs in the background without intervention. For example, the automation «When I arrive home, turn on Wi-Fi and disable silent mode» triggers when entering the home geofence. The system requests permission for automation during initial setup and may disable it if used infrequently.

Shortcuts on macOS — since macOS 12 Monterey, Shortcuts are available on Mac. Scenarios sync via iCloud across all Apple devices. On Mac, system Actions are supported: Finder, Terminal, Automator, and AppleScript. macOS developers can add Actions via App Intents similarly to iOS.

App Intents and Intents framework for developers

App Intents is the primary framework for integrating an app with Shortcuts on iOS 16+ and macOS 13+. The developer creates a struct implementing the AppIntent protocol, describes parameters using property wrappers, and implements the perform() method. The system automatically registers the intent in Shortcuts, Siri, and Spotlight. For supporting older iOS versions (10–15), the Intents framework with INIntent and IntentHandler is used.

swift
import Intents

class IntentHandler: INExtension {
    override func handler(for intent: INIntent) -> AnyObject? {
        if intent is OrderCoffeeIntent {
            return OrderCoffeeIntentHandler()
        }
        return .none
    }
}

Testing App Intents — debugging intents is done through Xcode: select the app scheme, pass -intents in Arguments, and the simulator will show a list of registered intents for testing. To test a Shortcut in an environment close to real, build an app archive and install it on a device via TestFlight. Shortcuts from the app appear in the gallery after the first launch.

Advanced features App Intents support parameters with autocomplete (dynamic options), confirmation before execution, Siri intents (voice shortcuts), and creating widgets with launch buttons. Indexed intents (iOS 17+) are intents that Siri suggests to the user automatically based on context: time, location, and action history.

Frequently Asked Questions

How is a Shortcut different from a regular app?

Shortcut is a scenario linking actions of different apps, not a standalone application. The user does not write code but assembles a scenario from ready-made Action blocks. A Shortcut is triggered and executes without opening the Shortcuts app, whereas a regular app requires launching via an icon on the screen.

What triggers does Shortcuts support?

Shortcuts supports triggers: scheduled time, geofence when entering or leaving an area, NFC tag when touching an iPhone, app opening, widget tap, Siri voice command, charger connection, sleep mode and Focus mode, as well as specific app notifications. Configuration is done on the Automation tab.

Can I share a Shortcut with other users?

Yes, a Shortcut is exported as a .shortcut file and can be sent via AirDrop, iMessage, or published in the Shortcuts gallery through iCloud. The recipient imports the scenario and can use it. When downloading from the internet, iOS requires confirmation and warns about running untrusted scenarios due to potential security risks.

How does Shortcuts integrate with third-party apps?

Third-party apps add Actions through the App Intents framework on iOS 16+ or the Intents framework on older versions. The developer registers actions in Intents.intentdefinition, and they appear in the Actions gallery of the Shortcuts app. The user combines Actions from different apps — for example, sending a link from Safari to Bear notes.

Is programming required to create Shortcuts?

No, Shortcuts are created visually without code. The user drags and drops Action blocks from the list, configures parameters, and connects them sequentially. For advanced scenarios, blocks like Run Script Over SSH, Get Contents of URL, and Control Flow If, Repeat, For Each are available, but programming experience is not required.

Summary

  • Shortcut — an automation scenario for iOS, iPadOS and macOS, assembled from Action blocks
  • Shortcuts app — a visual builder with a gallery of 300+ built-in Actions
  • Triggers — time, geofence, NFC, widget, focus, charging — launch the scenario automatically
  • Siri integration — Shortcuts are launched by voice command without touching the screen
  • App Intents — a framework for iOS 16+ that adds third-party app Actions to Shortcuts
  • Magic Variables — automatic data transfer between Actions without manual configuration
  • iCloud sync — scenarios are available on all Apple devices via iCloud

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.

Discuss the project

Read also