Do I need to check Intent is eligible for Siri Suggestions before donate it with INInteraction? But I only want to donate this intent so Siri can add my widget to Smart Stack, not in Lock Screen or other places.
Intent Definition:
- Intent is eligible for widgets
- Intent is user-configurable in the Shortcuts app and Add to Siri
- Intent is eligible for Siri Suggestions
Donate Intent:
let widgetIntent = MyWidgetConfigurationIntent()
widgetIntent.range = .weekly // Configure my intent
let interaction = INInteraction(intent: intent, response: nil)
interaction.donate { error in
if let error = error {
// Error: Code=1901 "Cannot donate interaction with intent that has no valid shortcut types"
}
}