WWDC 2021: Shortcuts and actions
Find hereafter a detailed summary of four videos that belong to a taxonomy of some WWDC footages.
The original videos are available on the official Apple website (session 213, session 805, session 10084 and session 10283).
"Parameters take Siri Shortcuts to the next level, enabling an interactive voice experience in Siri with follow-up questions, and allowing people to customize shortcuts in the Shortcuts app, now built into iOS. Walk through setting up your shortcuts to take advantage of parameters and learn how your shortcuts can pass output to other actions when creating multi-step shortcuts in the Shortcuts app."
"Shortcuts enable people to quickly and easily accomplish actions or get things done hands-free using Siri and the Shortcuts app. Join us for a tour of where shortcuts can appear, how you can customize the experience, and how your app's shortcuts can be used with variables and actions from other apps."
"Learn foolproof ways to surface your app's actions in the Shortcuts app — and help people quickly set up powerful, personalized shortcuts using system intelligence. We'll detail how to configure your intents to appear in the new Automation Suggestions, explore how the system surfaces your app's actions for people based on their everyday app usage, and show you how you can make sure your app appears in all the right places within the Shortcuts app."
"Actions are the building blocks of shortcuts. They allow people to take advantage of your app's functionality even when they're not looking at your app's interface. We'll show you how to design actions that are useful, easy-to-use, and can be incorporated into powerful multi-step shortcuts. You'll also explore enhancements around publishing and sharing shortcuts, ensuring that people can access your app in the way they want across all of Apple's platforms."
Most of the illustrations are parts of the Apple presentations and may be available at the Resources
section inside the Overview
sheet of each video.
Shortcuts #
Parameters #
There are three different manners for using the shortcut actions.
New in iOS
13
, the conversational shortcuts offer a new way for sharing between the app and the user.
This support for parameters opens up new horizons regarding the user experience.
Shortcuts app #
A natural language format, an action suggestions pane and action's outputs possibly taken into account for later activity are mainly the iOS
13
new features in the Shortcut editor
.
Adding the "Add to Siri" button in an app gives rise to an easier and tailored user experience through the iOS 13
new design.
Shortcut customization #
The Xcode Intent editor is the tool to be used for promptly customizing a shortcut.
Parameter resolution #
Not only does Xcode produce an Intent handling protocol for every defined Intent, but it also provides Resolve methods for each parameter that are marked as configurable.
Understanding the resolution of the Intent parameters relies on its life cycle explanation through its Resolve
phase
.
The six possible Resolution Result types are to be checked with both Siri and the Shortcuts app so as to be sure of the final rendering.
Related parameters #
In some cases, it may be interesting to properly handle parameters that have dependencies on each other so as to offer a wider range of shortcuts creation.
The simplest implementation of a shortcut used by Siri
for instance, involves no specific dependencies between the parameters.
Customizing the shortcut may be also an option for this use case with the Shortcuts
App
.
However, diving deeper into the possible choices for the user may lead to conditional relations between some of the parameters.
Few basic rules are to be followed in order to set up an appropriate shortcut including related parameters.
The first step consists in accurately defining the parameter type that will suggest different elements.
Next, the relationship between parameters is to be defined inside the Parameters section.
Finally, the Shortcuts app section that highlights the possible combinations of parameters with a preview for the final rendering will permit a complete definition of the ultimate summaries.
When a group of values is to be exposed for framing the user's choice, it's necessary to tick the Dynamic Options in Xcode
that will automatically produce two additional intent handling protocol methods.
Few elements need to be handled in Xcode
to reach a simple result with chained shortcuts.
Regarding more complex examples, chaining shortcuts to each other may rely on creating one's own custom type for passing the appropriate information to the next action.
Build & Discover #
Each component of a shortcut has a dedicated purpose that can be defined in the Intent editor
of Xcode
.
The simplest way to create a shortcut relies on the app itself through the Add to Siri button by following some basic rules to render the best user experience.
Since iOS
13
, the Shortcuts app
contains a Gallery
section inside which various actions are available to be chosen for creating shortcuts too.
The suggested shortcuts in this Gallery
section may be supplied in two ways: 1/ display the most popular user's actions or 2/ set up a predefined list.
The first method leans on the concept of donation that's explained in the next tabulation element.
In addition to the methods previously described, including actions in the Shortcuts
Gallery
might also depends on the intents handling.
Not only does this notion permit to display the shortcuts in the Gallery
, but it also provides them various iOS
native functions in the device⟹ 🎬
Notify a key parameter in Xcode
and donate an action as soon as possible are the best ways to make various options highlight in the Gallery
section⟹ 🎬
Should someone tap on the Apps
button, a list of all the apps that support shortcuts will be displayed.
Donation created by code is the proper path to follow for pointing out some actions in the appropriate sections⟹ 🎬
Actions #
Overview #
The goal of an action is to provide the user a way to interact with an app without opening it.
A model example of this implementation is the calendar app that permits the creation of various shortcuts through the dedicated app on mac for instance.
The Suggestions
widget, Search
and the Lock
screen contain and propose some actions automatically recognized by Siri
if donated to the system.
Efficient properties #
🎬
Useful means:
- Perform a task outside the app⟹ the reminder app is a perfect example to highlight this statement. However, a dedicated question may be required when further input parameters are necessary to reach the user's goal.
- Not too immersive⟹ 🎬
- Repeatable⟹ 🎬
It's better to consider the goal of a bunch of actions as different steps to be followed instead of one single task to be fulfilled.
This break-up of elements allows a broader extension of their range through many shortcuts.
Various outgoing properties may be exposed by an action so as to create multiple possible functionalities through other actions.
When creating actions as per a modular concept, some of them are strongly recommended to be planned first.
Sometimes through the Dynamic Enumerations, parameters may be suggested for incoming values at two different times:
- Configuration, when an action is set up in the
Shortcut editor
. - Resolution, while an action is on the run.
The crucial interfaces introduced to the user when an action is on the run are called snippets.
A new representation of the actions is highlighted in the editor.
Some attention elements must be outlined regarding the parameter summaries:
New sharing methods have been introduced to distribute the shortcuts and the actions available through an app.
Now, the "Add to Siri" button automatically adds the shortcut in its database by means of an intermediate screen if no invocation phrase is suggested.
Automation #
Introduced in iOS
13
, the personal automations have experienced further improvements in iOS
14
offering a much wider spectrum of use...
...and the automation suggestions are still enriched by donations.
As a specific type of automation featured in iOS
13
, the Daily Routines contain useful and often little known information.