Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
private func donate(name: String) {
// 1
let intent = CheckMyGitHubIntent()
// 2
intent.suggestedInvocationPhrase = "Check my GitHub"
intent.name = name
// 3
let interaction = INInteraction(intent: intent, response: nil)
// 4
interaction.donate { (error) in
if error != nil {
if let error = error as NSError? {
print("Interaction donation failed: \(error.description)")
} else {
print("Successfully donated interaction")
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.