title: Location manager didUpdateLocations not being called
body: <p>For some reason <code>didUpdateLocations</code> is not being called, even when I set the delegate to the view controller. In <code>info.plist</code> I set the key <code>Privacy - Location When In Use Usage Description</code> to a description. So I'm not sure what I could be doing wrong?</p>
  
  <pre><code>import MapKit
  import CoreLocation
  
  class OptionsViewController: UIViewController, UITableViewDelegate, CLLocationManagerDelegate {
      override func viewDidLoad() {
            //Ask user for location
          locationManager = CLLocationManager()
          locationManager.requestWhenInUseAuthorization()
  
          //Use users current location if no starting point set
          if CLLocationManager.locationServicesEnabled() {
              let locationManager = CLLocationManager()
              locationManager.delegate = self
              locationManager.desiredAccuracy = kCLLocationAccuracyBest
              locationManager.startUpdatingLocation()
          }
      }
  
      override func viewDidAppear(_ animated: Bool) {
          locationManager = CLLocationManager()
          locationManager.requestWhenInUseAuthorization()
      }
  
      func locationManager(_ manager: CLLocationManager, didFailWithError error: Error){
          locationManager.stopUpdatingLocation()
          print(error)
      }
  
      func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
          print("Did update location called?")
          let locValue:CLLocationCoordinate2D = manager.location!.coordinate
          print("locations = \(locValue.latitude) \(locValue.longitude)")
      }
  }
  </code></pre>