Skip to content

Instantly share code, notes, and snippets.

@fitomad
Created September 3, 2018 06:57
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 fitomad/307d688fc7d08ae1b387f2e1da39b8c9 to your computer and use it in GitHub Desktop.
Save fitomad/307d688fc7d08ae1b387f2e1da39b8c9 to your computer and use it in GitHub Desktop.
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
if let intent = userActivity.interaction?.intent as? BookRideIntent {
// Viene de Siri
let handler = BookRideIntentHandler()
handler.handle(intent: intent) { (response) in
if response.code != .success {
os_log("Algo ha pasado con la peticion")
}
}
return true
} else if userActivity.activityType == NSUserActivity.bookRideActivityType {
// Viene de Search (Spotlight)
// Reseteamos la vista de selección de trayecto...
return true
}
return false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment