-
Donate intents and expand your app’s presence
Discover how you can make key parts of your app available for someone at exactly the right moment — without them ever needing to open it. Learn how to craft and donate intents to the system, helping you surface relevant and contextual information about your app in Siri, Focus, Shortcuts, the Smart Stack, and more. We'll explore how the system intelligently identifies information and show you techniques for structuring intents to help increase engagement and visibility for your app.
Recursos
Videos relacionados
WWDC21
- Add intelligence to your widgets
- Design great actions for Shortcuts, Siri, and Suggestions
- Send communication and Time Sensitive notifications
WWDC20
WWDC18
-
Buscar este video…
-
-
0:01 - Intent donation example
// Donate your intent. let intent = CheckWeatherIntent() intent.location = weatherLocation let interaction = INInteraction(intent: intent, response: nil) interaction.donate { (error) in // Handle the error. } -
0:02 - Intent deletion example
// Donate your intent. let interaction = INInteraction(intent: intent, response: response) interaction.identifier = "68753A44-4D6F-1226-9C60-0050E4C00067" interaction.groupIdentifier = "san-diego" interaction.donate { (error) in // Handle the error. } // Delete individual donations. INInteraction.delete(with: ["68753A44-4D6F-1226-9C60-0050E4C00067"]) { (error) in // Handle the error. } // Delete group donations. INInteraction.delete(with: "san-diego") { (error) in // Handle the error. } -
0:03 - Intent donation example 2
// Donate your intent. let intent = OrderCoffeeIntent() intent.item = item intent.size = size intent.date = date let interaction = INInteraction(intent: intent, response: nil) interaction.donate { (error) in // Handle the error. }
-