Does reverse geocoding require cellular/wifi? I'm using the following code to find the name of the city and the zip code. Will this code work in an environment with a GPS connection but without cellular connection?
geoCoder.reverseGeocodeLocation(location, completionHandler: { (placemarks, error) -> Void in
print("REVERSE COMPLETED")
// Place details
var placeMark: CLPlacemark!
placeMark = placemarks?[0]
// Address dictionary
print(placeMark.addressDictionary)
// City
if let city = placeMark.addressDictionary!["City"] as? NSString {
print("You are in \(city)")
} else {
print("An error occured while fetching the CITY.")
}
// Zip code
if let zip = placeMark.addressDictionary!["ZIP"] as? NSString {
print("The zip code is \(zip)")
} else {
print("An error occured while fetching the ZIP code.")
}
})