Too many Location Updates occuring in rapid succession

Hi,

I have witnessed a situation where location updates are generated via the device far too frequently according to the CLLocatonManager settings used.

There have been sporadic instances where a location update is generated by the device every 0.01 seconds for a period of seconds resulting in hundreds of updates being transmitted from the device.

The app starts background location updates using startUpdatingLocation() with a distance filter set to 20m.

I can see some of the lat/long co-ords generated for each location update are identical so it appears that the distance filter isn't working correctly. This is sporadic though and it appears the the device will return to correct operation after a few seconds but also after hundreds of location updates have been generated.

Has anyone else witnessed this behaviour and understands the cause?

Appreciate any guidance as to how to remedy.

Replies

There have been sporadic instances where a location update is generated by the device every 0.01 seconds for a period of seconds resulting in hundreds of updates being transmitted from the device.

I suppose you are transmitting data based on updates from location services. In that case, your design lacks the ability to know when there is a significant location change compared to the last location and when to transmit this change. Location services are working as expected according to the selected method of precision. You need to know when to transmit that change from the device.

Hi,

Thanks for your reply.

You are right with your comment "your design lacks the ability to know when there is a significant location change compared to the last location" but why would I need that when I have a distance filter set to 20m? Surely this is the filter that would control location updates?

I have noticed that it appears to be a single user with an iPhone 14 where I see this behaviour.