title: Location Update not working
body: <p>I am trying to make the location update happen even if the user exited the view going back to the previous view.
  To make this happen i have created a separate class that handles my location update but I am encountering strange behavior.</p>
  
  <p>First of all my authorization request was only popping up for a split second and than disappearing so i moved it back to the actual view.
  However my location update is still not working. 
  The location icon appears on the device but it never enters the didLocationUpdate function. Neither is it entering didFailWithError.
  I'm pretty new to iOS so i have no idea what im doing wrong.</p>
  
  <p>Here is my class:</p>
  
  <pre><code>import CoreLocation
  
  class RouteLocation: NSObject, CLLocationManagerDelegate{
  
      var locationManager:CLLocationManager!
  
      var databasePath = ""
      override init(){
  
          super.init()
  
          let dirPaths =
              NSSearchPathForDirectoriesInDomains(.DocumentDirectory,
                                                  .UserDomainMask, true)
          let docsDir = dirPaths[0] as NSString
  
          databasePath = docsDir.stringByAppendingPathComponent(
              "\\firstAscent.db")
  
          // For use in foreground
          locationManager =  CLLocationManager()
          locationManager.requestWhenInUseAuthorization()
  
  
         //   locationManager.requestAlwaysAuthorization()
          //  print("in location")
  
              if CLLocationManager.locationServicesEnabled() {
                  print("System Services enabled")
                  self.locationManager.delegate = self
                  self.locationManager.desiredAccuracy = kCLLocationAccuracyBest
                  self.locationManager.distanceFilter = 10
                  self.locationManager.startUpdatingLocation()
              }
  
  
      }
      var isLocationMising = true
  
  
      func locationManager(manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
          let locValue:CLLocationCoordinate2D = manager.location!.coordinate
  
          let latitute = locValue.latitude
          let longitute = locValue.longitude
          print("locations = \(locValue.latitude) \(locValue.longitude)") //continues to make SQL query calls 
  </code></pre>
  
  <p>I call it from the view with: <code>_ = RouteLocation()</code></p>