-
-
Save fitomad/307d688fc7d08ae1b387f2e1da39b8c9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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