问题
I have developed a walk app that can record distance, on iOS7, iOS8, the distance is mostly fine although sometimes not accurate, but on iOS9.0, the distance often too large, so I check
- (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray<CLLocation *> *)
Locations method, and find some time get locations like this: A、B、C, but coordinate of C is equal to A, which i think is weird
I find startUpdatingLocation
called every seconds, after get rid of it , it gets better, but still happens
here is the demo source code
回答1:
For ios 9, you have to set allowsBackgroundLocationUpdates.
来源:https://stackoverflow.com/questions/33147568/weird-locations-from-cllocationmanager-in-ios9