0

I am playing with the IOS location tracking using swift 4. I see that the method didUpdateLocations executes every single second

Log of position tracking

If there is a way to increase the time from 1 second to n seconds, please let me know. I think it can reduce battery consuming issue of the app later.

Thank you in advance!

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Luong Truong
  • 1,953
  • 2
  • 27
  • 46

1 Answers1

0

This line of code solved my problem. It will notify the LocationManager every 100 meters

locationManager.distanceFilter = 100.0;

Thank you: How to stop multiple times method calling of didUpdateLocations() in ios

Luong Truong
  • 1,953
  • 2
  • 27
  • 46