Created
March 29, 2017 23:22
-
-
Save andrewxhill/c52a8d028d9be31e5ee21b9c3d409d54 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
// departure subscription | |
SetSDK.instance.onDeparture(.home) { departure in | |
// on departure, predict their likely destination | |
if let destinations = SetSDK.instance.getDestination(fromLocation: departure.location, fromTimestamp: departure.date), let destination = destinations.first { | |
// Process the top destination predictions | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment