didUpdateLocations is not being called after 17 - 18 minutes of running app perfectly in background. I've checked Location Updates option to make app run in background. App runs for 15 - 20 minutes then didUpdateLocation stops being called in background.
Please help
Thanks for posting the solution. In Swift 3, I set pausesLocationUpdatesAutomatically = false and it seems to be working very well.
let manager = CLLocationManager()
manager.desiredAccuracy = kCLLocationAccuracyBest
manager.delegate = self
manager.requestWhenInUseAuthorization()
manager.allowsBackgroundLocationUpdates = true
manager.pausesLocationUpdatesAutomatically = false
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With