1

I have developer an walk app that can record distance, on ios7,ios8,the distance almost fine although some time not accurate,but on ios9.0, the distance often too larger, so I check

- (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray<CLLocation *> *)

Locations method, and find some time timestamp of new location early than some previous location, it means location from callBack are not sorted by timestamp, why is that and how deal with it,

Thanks in advance

Mayank Patel
  • 3,868
  • 10
  • 36
  • 59

1 Answers1

0

after many try, I found call startUpdatingLocation in a period timer cause CLLocation returned by delegate often wrong, I think that's the problem

  • Did you confirmed that it was the problem ? I have similar issues but calling startUpdatingLocation multiple times have no effect on it. Als I cannot always reproduce it. See http://stackoverflow.com/questions/32838488/cllocationmanager-in-ios9-giving-incorrect-locations-ios8-is-ok?lq=1 for my problem – Sjoerd Perfors Oct 07 '15 at 11:53
  • hi, from the link, looks like we have the same problem, when no longer calling startUpdatingLocation multiples, I compare the log, the situation become much better, but also have some exception, such as if there three cooredinate :A, B, C, but c is euqal to C, which is not right – stupidrobot Oct 08 '15 at 03:21
  • continue... if set distanceFilter to some value like 5, it will perfect, I don't understand why, have you solved? – stupidrobot Oct 08 '15 at 03:29
  • Not yet :( but good to hear I'm not the only one. I will try to use distanceFilter. – Sjoerd Perfors Oct 08 '15 at 07:21