Reputation: 167
I implemented background location tracking using standard location services, and it works fine. However, since this implementation uses a lot of power, I decided to switch to significant location changes monitoring. Basically, I just changed all the calls to startUpdatingLocation
to startMonitoringSignificantLocationChanges
and reused the CLLocationManagerDelegate methods I have implemented before.
The problem is that after switching to significant location changes monitoring, the delegate method locationManager:didUpdateToLocation:fromLocation
only gets called once when I start monitoring, and is never called again afterwards. I have moved around the phone for a couple of kilometers, and tried riding a train with it, but still the method never gets called. Am I missing something here? Are there settings I need to enable or special code I need to write in order for this to work?
Thanks!
Upvotes: 1
Views: 1767
Reputation: 11699
The significant location change requires cell phone towers in order to operate. If you don't have cell phone reception you will not get any results. You can also call CLLocationManager's significantLocationChangeMonitoringAvailable method to see if it is available.
Upvotes: 1