Unable Return String from CLGeocoder reverseGeocodeLocation
问题 I want to write a function to reverse geocode a location and assign the resulting string into a variable. Following this post i've got something like this: extension CLLocation { func reverseGeocodeLocation(completion: (answer: String?) -> Void) { CLGeocoder().reverseGeocodeLocation(self) { if let error = $1 { print("[ERROR] \(error.localizedDescription)") return } if let a = $0?.last { guard let streetName = a.thoroughfare, let postal = a.postalCode, let city = a.locality else { return }