title: Why is Swift/Core Location showing my lat/long location as being in San Francisco -- even tho I'm in New York?
body: <p>Hey everyone — I have written some code that identifies location via CLLocation, then converts that lat/long value to a city with CLGeoCoder(). </p>
  
  <p>It's working in that the code runs and id's a location -- except I am in New York, and it keeps identifying me as being in San Francisco! </p>
  
  <p>Can you spot any clear mistakes I'm making in the code below? Thank you!</p>
  
  <pre><code>import CoreLocation
  
  class ViewController: UIViewController, CLLocationManagerDelegate {
  
      let locationManager = CLLocationManager()
  
      override func viewDidLoad() {
          super.viewDidLoad()
          // Do any additional setup after loading the view, typically from a nib.
  
          locationManager.delegate = self
          locationManager.desiredAccuracy = kCLLocationAccuracyHundredMeters
          locationManager.requestWhenInUseAuthorization()
          locationManager.startUpdatingLocation()
  
      }
  
      func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
          let location = locations[locations.count - 1]
          if location.horizontalAccuracy &gt; 0 {
              locationManager.stopUpdatingLocation()
              locationManager.delegate = nil
              let geoCoder = CLGeocoder()
              geoCoder.reverseGeocodeLocation(location, completionHandler:
                  {
                      placemarks, error -&gt; Void in
  
                      guard let placeMark = placemarks?.first else { return }
  
                      if let locationName = placeMark.location {
                          print(locationName)
                      }
  
                      if let street = placeMark.thoroughfare {
                          print(street)
                      }
  
                      if let city = placeMark.subAdministrativeArea {
                          print(city)
                      }
  
                      if let zip = placeMark.isoCountryCode {
                          print(zip)
                      }
  
                      if let country = placeMark.country {
                          print(country)
                      }
              })
  
          }
      }
  
  }
  </code></pre>