title: Find city name and country from latitude and longitude in Swift
body: <p>I'm working on application in Swift3 
  and I have letter problem i can't find the answer for it.  </p>
  
  <p>How can I know city name and country short names  base on latitude and longitude? </p>
  
  <pre><code>import UIKit
  import CoreLocation
  
  class ViewController: UIViewController, CLLocationManagerDelegate{
      let locationManager = CLLocationManager()
      var latitude: Double = 0
      var longitude: Double = 0
      override func viewDidLoad() {
          super.viewDidLoad()
          // For use when the app is open &amp; in the background
          locationManager.requestAlwaysAuthorization()
          // For use when the app is open
          //locationManager.requestWhenInUseAuthorization()
          locationManager.delegate = self
          locationManager.startUpdatingLocation()
          if CLLocationManager.locationServicesEnabled() {
              locationManager.delegate = self
              locationManager.desiredAccuracy = kCLLocationAccuracyBest
              locationManager.startUpdatingLocation()
          }
      }
      func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
          if let location = locations.first {
              print(location.coordinate)
              latitude = location.coordinate.latitude
              longitude = location.coordinate.longitude
          }
      }
      func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) {
          if (status == CLAuthorizationStatus.denied){
              showLocationDisabledpopUp()
          }
      }
      func showLocationDisabledpopUp() {
          let alertController = UIAlertController(title: "Background Location Access  Disabled", message: "We need your location", preferredStyle: .alert)
          let cancelAction = UIAlertAction(title: "Cancel", style: .cancel, handler: nil)
          alertController.addAction(cancelAction)
          let openAction = UIAlertAction(title: "Open Setting", style: .default) { (action) in
              if let url = URL(string: UIApplicationOpenSettingsURLString){
                  UIApplication.shared.open(url, options: [:], completionHandler: nil)
              }
          }
          alertController.addAction(openAction)
          self.present(alertController, animated: true, completion: nil)
      }
  }
  </code></pre>