Does anyone know if I can get the borough from a UK post code using CoreLocation framework? In the function listed below, the borough is not returned. It should return Tower Hamlets.
func getLocationFrom(postalCode : String){
let geocoder = CLGeocoder()
geocoder.geocodeAddressString(postalCode) {
(placemarks, error) -> Void in
let placemark = placemarks?[0]
print("placemark.addressDictionary are \(placemark.addressDictionary)") //does not print Canary Wharf
}
}
print(getLocationFrom(postalCode:"E14 9LR")) //does not print Tower Hamlets, it prints London, which is the city, not the borough..