I have created a simple intent for Siri shortcut and whenever i am trying to donate the intent, it is ending up with following error.
Interaction donation failed: %@ Error Domain=IntentsErrorDomain Code=1901 "Cannot donate interaction { intent = { user = ; identifier = 06DE1A38-6D46-4CB8-B825-3788E6A81420; }; dateInterval = <_NSConcreteDateInterval: 0x60000043cce0> (Start Date) 2018-07-17 12:38:39 +0000 + (Duration) 0.000000 seconds = (End Date) 2018-07-17 12:38:39 +0000; intentResponse = ; groupIdentifier = ; intentHandlingStatus = Unspecified; identifier = F145FA84-7147-41A8-8698-681F06C8CEB5; direction = Unspecified; } with intent that has no valid shortcut types" UserInfo={NSLocalizedDescription=Cannot donate interaction { intent = { user = ; identifier = 06DE1A38-6D46-4CB8-B825-3788E6A81420; }; dateInterval = <_NSConcreteDateInterval: 0x60000043cce0> (Start Date) 2018-07-17 12:38:39 +0000 + (Duration) 0.000000 seconds = (End Date) 2018-07-17 12:38:39 +0000; intentResponse = ; groupIdentifier = ; intentHandlingStatus = Unspecified; identifier = F145FA84-7147-41A8-8698-681F06C8CEB5; direction = Unspecified; } with intent that has no valid shortcut types}
The following is my intent donation code
func donateInteraction() {
let intent = GetBalanceIntent()
intent.suggestedInvocationPhrase = "Get Balance"
let interaction = INInteraction(intent: intent, response: nil)
interaction.donate { (error) in
if error != nil {
if let error = error as NSError? {
print("Interaction donation failed: %@", error)
} else {
print("Successfully donated interaction")
}
}
}
}
.intentdefinition
file? A print will be enough – Blintz