title: Swift background fetch location updates with Core Location
body: <p>I want to use Background Fetch Location Updates service on my app. But don't show any output my codes here i want your help.</p>
  
  <pre><code>import CoreLocation
  
  class ViewController: UIViewController, UITextFieldDelegate, CLLocationManagerDelegate  {
  
     var locationManager:CLLocationManager = CLLocationManager()
  
  
  
      override func viewDidLoad() {
          super.viewDidLoad()
  
  
          self.locationManager.delegate = self
          locationManager.desiredAccuracy = kCLLocationAccuracyBest
          locationManager.requestAlwaysAuthorization()
          locationManager.startUpdatingLocation()
  
  
          }
  
      func locationManager(manager: CLLocationManager, didChangeAuthorizationStatus status: CLAuthorizationStatus) {
          print("didChangeAuthorizationStatus")
  
          switch status {
          case .NotDetermined:
              print(".NotDetermined")
              break
  
          case .Authorized:
              print(".Authorized")
              self.locationManager.startUpdatingLocation()
              break
  
          case .Denied:
              print(".Denied")
              break
  
          default:
              print("Unhandled authorization status")
              break
  
          }
      }
  
     func locationManager(manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
  
          let location = locations.last as CLLocation!
  
          print("didUpdateLocations:  \(location.coordinate.latitude), \(location.coordinate.longitude)")
  
  
      }
  </code></pre>
  
  <p>Giving output only</p>
  
  <pre><code>didChangeAuthorizationStatus
  .NotDetermined
  </code></pre>
  
  <p>If it possible i want to take long lat value when new location changes.
  Thank you !</p>