Skip to content

Instantly share code, notes, and snippets.

@fitsyu
Last active August 2, 2019 10:33
Show Gist options
  • Save fitsyu/fa6435b34cbb00a14f027fe65d112191 to your computer and use it in GitHub Desktop.
Save fitsyu/fa6435b34cbb00a14f027fe65d112191 to your computer and use it in GitHub Desktop.
Growing list of wrapped CLGeocoder with PromisesSwift
extension CLGeocoder {
func reverseGeocode(_ location: CLLocation) -> Promise<([CLPlacemark]?,Error?)> {
return wrap { self.reverseGeocodeLocation(location, completionHandler: $0) }
}
// add some more here later
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment