Forcing CLLocationManager updates - does it help or hurt?

Posted by Steve N on Stack Overflow See other posts from Stack Overflow or by Steve N
Published on 2010-04-18T14:28:39Z Indexed on 2010/04/18 14:33 UTC
Read the original article Hit count: 465

I've been trying to find any way to optimize the performance of my location-based iPhone application and have seen some people mention that you can force location updates by starting and stopping your CLLocationManager. I need the best accuracy I can get, and the user in my case would probably like to see updates every few seconds (say, 10 seconds) as they walk around. I've set the filters accordingly, but I notice that sometimes I don't get any updates on the device for quite some time.

I'm testing the following approach, which forces an update when a fixed time interval passes (I'm using 20 seconds). My gut tells me this really won't help me provide more accurate updates to the user, and that just leaving CLLocationManager running all the time is probably the best approach.

- (void)forceLocationUpdate {
    [[LocationManager locationManager] stopUpdates];
    [[LocationManager locationManager] startUpdates];
    [self performSelector:@selector(forceLocationUpdate) withObject:nil afterDelay:20.0];
}

My question is- does forcing updates from CLLocationManager actually improve core location performance? Does it hurt performance? If I'm outside in an open field with good GPS reception, will this help then? Does anyone have experience trying this?

Thanks in advance, Steve

© Stack Overflow or respective owner

Related posts about iphone

Related posts about corelocation