Sounds like you should set some kind of time/date stamp on how often you call "setDesiredAccuracy
". If you call it once, don't call it again for some certain period of time.
something like:
- (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations
{
NSTimeInterval secondsSinceLastResetOfAccuracy = [lastResetTime timeIntervalSinceNow];
if(secondsSinceLastResetOfAccuracy > 60 * 60) // one hour
{
[self.locationManager setDesiredAccuracy:kCLLocationAccuracyKilometer];
[self.locationManager setDistanceFilter:9999];
lastResetTime = [NSDate date]; // new "time stamp"
}
}