Widgets
- Widget configuration allows you to provide options on the “back side” of the widget – these are parameters, that creates an ordered list of parameters
- You define your scheme right in the app Intent code
- You can provide dynamic parameters, which are supported by queries – check out Dive in to App Intents from WWDC2022
- To migrate your widgets to app intents, via a single button. Once you do it, you can remove your definition file.
- You may have to adjust some of the resultant code
- Whenever your app is updated by the customer, it will automatically upgrade their intents
- Widgets can now perform actions
- App Intents can be used for Siri Shortcuts too – Bring your Widget to Life is a great session to catch up on this.
- Dynamic options in queries. So you can create queries that are dependent on other intent information via @IntentParameterDependency
- Array size, allows you to limit the size of a parameter so you can ensure things fit on the widget which is being displayed
- You can also use ParameterSummary to show a sequence of items, and including a new When function to show content under certain sizes
- Continue User Activity – allows you to position users in your app when they tap on your widget
- RelevantIntentManager is used to help surface your intent at the right spot and time for a user
Developer experience
- Framework support allows you to place your intents in Frameworks via AppIntentsPackage to reduce compile time, code distribution size, etc.
- May need to refactor my Wasted Time App Intents
- App Shortcuts in extension – you can create an AppShortcutsProvider so that your app does not to be launched when using your Shortcuts
- The compiler will extract app intent information and the a Metadata.appIntents – this process has been sped up in Xcode 15.
- Ability to continue an Intent in your app. So if you start an intent outside of your app, you can then enable ForegroundContinuableIntent conformance to enable this.
- Added support for Apple Pay in App Intents, this was enabled in iOS 16.5
Shortcuts app integration
- You can use app intents in Shortcuts, App shortcuts, Siri Voice, Apple Watch Ultra Action Button, and Focus Filters
- And now you can add more integration with SwiftUI Apps Interactive Live Activities, and Interactive Widgets
- You should create a good ParameterSummary, make sure they read like a sentence.
- Use isDiscoverable as needed – especially if it is only valuable within your app itself. Like only in your interactive widgets
- You can also now provide progress via ProgressReportingIntent protocol
- Find actions can are easier to integrate with, add EntityPropertyQuery or EnumerableEntityQuery (this is easier, but is optimized for small number of entities)
- Intent description – has been updated with ResolvedValueName to be more descriptive based on the action being taken