Skip to content

Instantly share code, notes, and snippets.

@shiningabdul
Created October 8, 2018 21:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shiningabdul/e234c013a79082d335a474ad295aed3f to your computer and use it in GitHub Desktop.
Save shiningabdul/e234c013a79082d335a474ad295aed3f to your computer and use it in GitHub Desktop.
Updated view controller to donate shortcut
@IBAction func showButtonTapped(_ sender: Any) {
guard let newMessage = messageField.text else {
return
}
messageLabel.text = newMessage
let intent = IntentManager.shared.intent(withMessage: newMessage)
IntentManager.shared.donateShortcuts(withIntent: intent)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment