Streaming is available in most browsers,
and in the Developer app.
-
Design App Shortcuts
Learn how you can surface great features from your app directly in Siri, Spotlight, and the Shortcuts app. We'll introduce you to App Shortcuts, provide best practices to help you evaluate features in your app that would work well as App Shortcuts, and take you through the process of creating one of your own. Learn how to create clear and memorable names, design custom visuals, collect required information, and create discoverable shortcuts
Resources
Related Videos
WWDC23
Tech Talks
WWDC22
WWDC21
-
Download
♪ instrumental hip hop music ♪ ♪ Hi, I'm Lynn, a design producer for Siri and Shortcuts. And today, I'm going to tell you a bit more about the new App Intents framework and how you can use it to design great App Shortcuts. Here at Apple, we know that people love using Siri and Spotlight to accelerate common tasks across devices, like this.
Remind me to buy garlic.
Set a timer for 20 minutes.
These habitual tasks can be easily completed outside their respective apps, and making them available via Siri and Spotlight gives people flexibility in how they interact with their device and how they get things done. Shortcuts are how you can offer people that same flexibility to accomplish key tasks from your app throughout the OS. And all shortcuts begin with a fundamental component called actions, which represent an individual task that people can complete with your app, such as creating a reminder or sending a message. This foundation can be used in a couple different ways. First, for custom shortcuts, which people can create using one or more actions from apps; that is, your app and others. Or an action can be used to create an App Shortcut, created by app developers like you, containing one action from your app. And while in the past, people needed to find and tap the Add to Siri button to enable each new app shortcut you created, now, with iOS 16, the App Shortcuts you create for your app will be automatically available as soon as your app is installed. That means they'll be available in Siri, visible in Spotlight, and featured in the Shortcuts app, making it easier than ever for people to access their favorite features from your app throughout the OS. Today I'm going to walk through a few different areas to help you create unforgettable App Shortcuts. I'll start with how to select the right features from your app to turn into shortcuts, and how to name them. Then, I'll walk through some best practices for presenting your visuals and for collecting required information. And finally, I'll let you know how you can tell people about your new shortcuts. So let's jump in. Now your app has a wide range of features. But we know that some things lend themselves better than others to becoming great shortcuts. So what should you look for? Think about the features people love in your app, and then focus on tasks that are self-contained, meaning they can be completed outside your app; and straightforward, in that they're efficient to get through. To give these principles a bit more context, let's take a look at a sample meditation app. We'll just call it "Meditation." Now a great App Shortcut is one that actually doesn't require your app in focus at all. You're looking for a lightweight task that can be completed via Siri or via search in its entirety. For our new Meditation app, that'd be something like this.
Start sleep meditation. Voiceover: Take a deep breath, close your eyes, and leave the day behind.
It's easy to kick this off without opening the app, and it just starts playing. You also want to make sure the shortcuts you author are straightforward. They should feel effortless to get through. Tasks that require a lot of input may be too tedious and time-consuming for a shortcut. For example, a lengthy, multistep survey like this one wouldn't be appropriate for an App Shortcut. Instead, focus on uncomplicated tasks that people can succeed at quickly, and that they can remember even when they're not using your app, like this.
So the best features from your app to turn into shortcuts are self-contained and straightforward. They can be completed without the app in focus and are uncomplicated to get through. And all in all, there may not be so many of these. The maximum you can create is 10, but in most cases, the key features of your app can be captured in two to five high-quality app shortcuts, and we strongly recommend keeping your set as focused as possible. Now, as important as selecting the right features to become app shortcuts, is authoring a great phrase to name them. This name is really the hero phrase for your shortcut. It appears in the Shortcuts app under your app's header, it's how your shortcut will be referenced in Spotlight and it's what people will say to Siri to invoke your shortcut. So where to start? The first important thing to remember when you're crafting that hero phrase is to keep it brief. You want your app shortcut phrase to be easy to remember and to clearly communicate its function. As a requirement, you'll need to include your app name. But you can be creative about it! See if you can incorporate your app name directly into the invocation phrase, like here with Voice Memo or here with Panera. And the app name in this phrase can be your official app name or any of the alternative names you submitted to the App Store. In this case, Panera Bread is the official app name, but the Panera synonym feels more natural in the phrase. And here's how that could look with our app, Meditation. Let's dig a little deeper with the Voice Memo example. I'll turn on my transcriptions so we can see my speech. Remember that the name you choose for your App Shortcut is also what people will say to Siri to invoke it, and you need to provide thoughtful natural language variations to ensure it works for whatever similar phrases people might say. For example, for this shortcut, named Record Voice Memo, I would need to explicitly specify "Start Voice Memo" and "New Voice Memo" as synonyms, otherwise they won't work. Be sufficiently thorough here. You want to try to capture all the alternative phrases people might say. But -- and this is a bit of a judgment call -- make sure you're not straying too far from the core purpose of your shortcut and entering into a new meaning with these phrases. In this case, the intent is truly to create not to save. And remember, you will have to go through this exercise of providing thorough synonyms for every language that your app is published to ensure a robust experience around the world.
So I've talked about the importance of keeping your app shortcut name brief and memorable, creative strategies for incorporating your app name, and the value of generating thorough synonyms and translating those synonyms to other languages. The last thing I want to talk about when it comes to naming your shortcut is how and when to use a dynamic parameter. You can now use a dynamic parameter directly in the name of your shortcut to create multiple variations on the phrase that people can say to Siri or see in Spotlight. Let's take a look at an example. So for our Meditation app, the dynamic parameter could be different types of meditation. And you can see how this provides the flexibility to directly ask for those different types. But there are a couple things to note about this parameter. First, you can only have one dynamic parameter in your phrase, and it can only be used to select from a finite list. You want to make sure that other values in the list are predictable since people won't have this list of options in front of them for reference. This is a good example because people are likely familiar with the different meditation types from using the app, and it's also a small list. Other good examples might be recent restaurants that are front of mind or different rooms in the home. A bad example would be something with infinite options, like a time value. You don't want to use a dynamic parameter here, but instead, prompt for additional information as needed. I'll talk more about that in a bit. Last thing to note is that this list of possible parameter values can be updated any time your app is open, so you can ensure it consistently contains up-to-date and relevant values. Now, each parameter value, in combination with the App Intent, creates a unique variant of your app shortcut. So for starting a meditation, you'd have this unparameterized version and each parameterized version, like Start Sleep Meditation, Start Gratitude Meditation, and all the others. These are automatically generated and displayed in the Shortcuts app, as you see here, and shown as individual rows in Spotlight. These parameters are also visible in the Shortcuts editor when you provide a parameter summary for your action. When someone taps on the parameter, your options will appear in a menu like this. To learn more about actions and how they appear in the Shortcuts editor, check out this talk from last year on designing great actions for Shortcuts, Siri, and Suggestions. The last important consideration when it comes to including a dynamic parameter is making sure it's clear which part of the phrase is a parameter. As I mentioned, you can only have one dynamic parameter per app shortcut, but if you had this as your app shortcut, the second part of the phrase -- "nature sounds" -- seems like a second parameter that can be changed. This could make people think they can say "gratitude meditation with ocean sounds," when in fact, only the first part of the phrase can be changed. The solution here is to keep it simple. If it feels too complicated when you say it aloud, it probably is. And if that additional information is absolutely required, you can ask for it in a subsequent step, and I'll provide some tips on how to do that later. Looking back at everything I mentioned about selecting features, naming your shortcut, and using dynamic parameters, one theme stands out, and that's to make it memorable. Within your app, people can explore, get drawn into features, and learn new flows. But with shortcuts, your main goal is to create a few focused experiences that people can quickly learn, remember, and grow to depend on. Now let's take a look at some visual considerations for your app shortcuts. Custom Snippets and Live Activities provide you with an opportunity to present information, request clarifications, and surface your app identity, and I want to share some tips for making them as beautiful and effective as possible. Unlike most of your apps that likely use opaque backgrounds, snippets use a semitranslucent material. Place elements from your app on top of this material instead of filling the visual with an opaque background. You can see an example here, with elements from the Weather app integrating seamlessly into the Siri snippet. And when you draw your text, use vibrant label colors to guarantee great contrast over the translucent background. Doing this ensures that your text will automatically look great in Dark Mode too. Now there are two ways to show results in iOS 16: Live Activities and Custom Snippets. If you're not sure which one to use, think about whether people would benefit from continuous access to this information, such as transit progress for a food order or a timer counting down. If so, use a Live Activity. This will make the content continuously glanceable, even on the Lock Screen, until the event has ended. If not, and the shortcut is a self-contained action or piece of information, use a Custom Snippet. Let's take a closer look at the iOS snippet and a couple of the key elements it contains. Here, you see the supporting dialog. This is what Siri speaks and is intended to accompany your custom visual. Together, they communicate all the necessary information for this step of the shortcut. Now by default, your custom visual will consistently appear with supporting dialog. But in this example, you can see that the supporting dialog is fully redundant with your visual response. When that's the case, you should suppress this dialog in your source code so that it won't be shown. But the presentation of your information goes beyond iOS, and you'll need to think about other devices in the ecosystem as well. For voice-only products, like AirPods, Siri will read out the full dialog you provide. For these platforms, it's important that your full dialog contain all the critical information from both your custom visual and any supporting dialog. Be sure to provide both types of dialog, so that people have access to all the information they need regardless of which device they choose to interact with your shortcut. And for the first time, Apple Watch now supports Custom Snippets as well. This means you should take a look at your shortcuts in watchOS 9 and make sure they look great on that platform as well. And know that this may require you to make changes to your layout. Here you can see how the Coffee app repositioned the address line on watchOS to fall beneath the header to help with readability. Just to recap these first few visual tips. I walked through how to integrate elements from your app into the translucent background, the importance of using vibrant label colors, the appropriate time to use snippets versus live activities, and how to adapt your dialog and visuals for different platforms and contexts. Now, let's talk about Spotlight. In iOS 16, your app's shortcuts will also appear in Spotlight. If someone searches for your app name, one app shortcut -- the first one in your App Shortcuts array -- will appear as a Siri Suggestion below your app as a top hit. They can also search directly for the name of the shortcut, and any app shortcut that matches the search term will appear. Finally, if your app is a Siri Suggestion when someone first launches Spotlight, your top shortcut will also appear here, even before anything has been typed into the search field. This is all really exciting, because it provides an opportunity for people to learn about your shortcuts just by looking for your app or by using their phone. You'll also notice that each unique app shortcut is decorated with a symbol on the right side. Be sure to review the SF Symbols library and select one for each of your app shortcuts that accurately reflects its intent. Also, know that the order of your actions and your parameters will influence the order your app shortcuts appear in Spotlight. Actions can only be reordered with app updates, but as I mentioned earlier, the order of your parameters is truly dynamic and can be updated any time your app is open. This in turn impacts how your shortcuts are shown. Here, you see that Reorder Coffee App Cappuccino is first in the Shortcuts app and takes the single slot in Spotlight. But maybe this customer ordered a chai latte more recently, and you want that to be your suggestion in Spotlight. You can make it the first item returned by your entity query or dynamic options provider, and it will become first in the Shortcuts app and in Spotlight. And as the number of parameters increases, this prioritization may become even more important. But be sure to pick a meaningful heuristic -- such as recency or frequency -- to drive the order, so that it doesn't feel random or unpredictable. And one last thing -- pick a color for your shortcuts in the Shortcuts app. We have a bunch of great colors for you to choose from, and all your shortcuts will use this color in the app. So pick one that complements your app icon nicely and don't just stick with the default. Now, as quick and contained as your shortcuts aspire to be, there may still be times when you need to collect some information in order to see a task though. I'm going to walk through a few different ways to do that and when to use each one. Take a phrase like this one that doesn't contain a parameter. Sometimes, you can make an informed decision and assume a value and then proceed with the action. One example here might be starting a meditation that was already in progress. But other times, in the face of an ambiguous request, you'll need to ask for more information. When possible, try to make a meaningful assumption and present it as an option for people to confirm. This is called a Parameter Confirmation. These assumptions could be based on remembering a prior selection or based on something like the most popular option. Parameter Confirmations are a nice, efficient way to be sure you have the detail you need and continue on. But let's say the person has never gone through this shortcut before and you don't have a single parameter to offer. Another option is to provide a short list. This is called a disambiguation and helps people that are unfamiliar with the shortcut learn the possible values. Just keep in mind that this is best for lists of five values or less, because in voice-only modalities, such as AirPods, Siri will read this entire list aloud. What kind of meditation? Focus, Gratitude, Walking, Compassion, or Sleep? Sometimes, you need to collect an open-ended value that isn't compatible with a short list, like a number, a location, or a string. In these situations, you can use an open-ended request. This has the fewest guardrails though, since there are no suggested values and people can say anything in response, so make sure it's clear what type of information your app is expecting. In this case, it's apparent that the response should be a time value. The App Intent framework does provide a set of common options for these open-ended requests, such as numerical values, dates, or time values. If your required parameter aligns with one of these, definitely select it. This will allow you to benefit from certain built-in dialog and visual patterns, as well as Siri's natural language understanding as it pertains to these types of information. If not, you can use a custom entity. For more information on how to implement app entities, check out this year's talk called "Dive into App Intents." Lastly, even if you have all the information you require, you may still want to do one final confirmation -- what we call an "intent confirmation" -- before proceeding with your shortcut. The guidance here is to only use this step for consequential actions, be it a financial transaction, a destructive action like deleting content, or an action that may just feel high risk, like sending a calendar invite to a big group. Use these appropriately but sparingly, as the goal of getting through a shortcut as quickly as possible always applies. One last detail on intent confirmations is that they will always have a pair of buttons in the snippet, offering to either proceed with -- or cancel -- the proposed action. When confirming an intent, buttons should contain a verb reiterating the action that is about to be taken and not ambiguous words like "confirm." The App Intents framework provides a really helpful set of default verbs with corresponding synonyms. You can see a few examples here. If your intent maps to one of these, go ahead and use it. If you have a specific intent that falls outside this group, you can provide a custom string instead but be sure to provide synonyms as well so that Siri understands all the similar phrases. Last but not least, once you've created an awesome set of app shortcuts, there are a few places to surface them for people to discover. First, in place of the old Add to Siri button is a new tip for you to feature in your app. It's important that you carefully select moments within your app to surface these tips, at a time when people are likely to benefit from the education, such as immediately before or after completing an action that they may want to repeat in the future. And where appropriate, make your tip dismissible. Respect people's desire to remove this helpful information from their workflow. We've also provided a button that you can place in your app to link to the Shortcuts app directly to the landing page that lists all your app shortcuts. It's an exciting year for shortcuts, with the introduction of App Shortcuts, created by you, and seamlessly available in Siri, Shortcuts, and Spotlight. With dynamic parameters in the invocation phrase, Custom Snippets on watchOS, new tips, and more, there's a lot to explore. And with all the info I walked through today on selecting and naming great app shortcuts, refining your presentation and flow, and including tips for discoverability, you're well on your way to an amazing App Shortcuts experience. We can't wait to see what you create, and have a great rest of WWDC. ♪
-
-
Looking for something specific? Enter a topic above and jump straight to the good stuff.
An error occurred when submitting your query. Please check your Internet connection and try again.