title: Show current locations in MKMapView in swift
body: <p>I'm fairly new to Swift and the following code isn't asking me for location privileges or showing my current location in MKMapView. I have already added NSLocationAlwaysUsageDescription to my info.plist but my simulator is still not asking for my permission for location or showing my current loc.</p>
  
  <pre><code>import UIKit
  import MapKit
  import CoreLocation
  
  class MapViewController: UIViewController, CLLocationManagerDelegate {
    @IBOutlet var mapView: MKMapView!
    var locationManager: CLLocationManager!
  
    override func viewDidLoad() {
          super.viewDidLoad()
  
      if (CLLocationManager.locationServicesEnabled())
      {
        locationManager = CLLocationManager()
        locationManager.delegate = self
        locationManager.desiredAccuracy = kCLLocationAccuracyBest
        locationManager.requestAlwaysAuthorization()
        locationManager.startUpdatingLocation()
      }
    }
  
    func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
      if let location = locations.last
      {
        let center = CLLocationCoordinate2D(latitude: location.coordinate.latitude, longitude: location.coordinate.longitude)
        let region = MKCoordinateRegion(center: center, span: MKCoordinateSpan(latitudeDelta: 0.01, longitudeDelta: 0.01))
        self.mapView.setRegion(region, animated: true)
      }
    }
  
  }
  </code></pre>
  
  <p>Thanks in advance.</p>