title: iOS 11, app not updating location when force killed by user
body: <p>I am working on an application that requires real time location tracking soo I'm using <code>startMonitoringSignificantLocationChanges</code> and everything is working fine on my iOS 10 simulator even when app has been force quit by the user from the app switcher. I'm using the freeway-drive option when debugging via the simulator also so that the location keeps changing. </p>
  
  <p><strong>But for iOS 11 simulator:</strong>
  When the app is in background or foreground mode the server is updated with the users real-time location but when app has been force quit, this doesn't happen. </p>
  
  <p>The server is not getting the updated location and i even put a breakpoint in <code>didFinishLaunching</code> and used the <code>wait for executable to be launched</code> setting to check if i get a callback, but i don't for iOS 11 and do for iOS 10.</p>
  
  <p>I have also updated the info.plist with appropriate values that are needed for iOS 11 and have confirmed that i'm giving the "always" permission.
  I am using a singleton for the location manager object using the code:</p>
  
  <pre><code>func setupLocationManager(){
  
      locationManager = CLLocationManager()
      locationManager.delegate = self
      locationManager.pausesLocationUpdatesAutomatically = false
      locationManager.allowsBackgroundLocationUpdates = true
      locationManager.requestAlwaysAuthorization()
      locationManager.distanceFilter = 100.0
      locationManager.desiredAccuracy = kCLLocationAccuracyHundredMeters
      locationManager.startMonitoringSignificantLocationChanges()
      locationManager.startUpdatingLocation()
  }
  </code></pre>
  
  <p>And in the app delegate:</p>
  
  <pre><code>if let _ = launchOptions?[UIApplicationLaunchOptionsKey.location] {
  
          ChatSocketHelper.sharedInstance.socket.on("connect") { data, ack in
  
              if let coordinate = LocationManager.shared.currentLocation?.coordinate{
  
                  ChatSocketHelper.sharedInstance.updateLocation([coordinate.longitude, coordinate.latitude])
              }
          }   
      }
  </code></pre>
  
  <p>And in the location delegate:</p>
  
  <pre><code>extension LocationManager : CLLocationManagerDelegate{
  
      func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
  
          guard let locationObject = locations.last else {return}
  
          //update to closest accuracy
          currentLocation = locationObject
  
          if ChatSocketHelper.sharedInstance.socket != nil{
  ChatSocketHelper.sharedInstance.updateLocation([locationObject.coordinate.longitude, locationObject.coordinate.latitude])
          }
      }
  }
  </code></pre>
  
  <p>Is this a known issue with iOS 11 that location is broken when force killed by the user? As i did some digging around and found similar issues for bluetooth but nothing significant for location changes otherwise.</p>
  
  <p>For example <a href="https://forums.developer.apple.com/thread/90931" rel="nofollow noreferrer">this</a> link.</p>
  
  <p><strong>Edit</strong>: Also <a href="https://stackoverflow.com/questions/46361459/why-location-updates-in-background-mode-is-slow-after-ios-11-update">this</a> posts talks about the updates being "slower" but i don't receive updates at all.</p>