ios: Changed distanceFilter from none to 5 meters, prevents it from spamming the callback even though nothing changed.
close #16
diff --git a/src/ios/CDVLocation.m b/src/ios/CDVLocation.m
index d52b03d..3f8679b 100644
--- a/src/ios/CDVLocation.m
+++ b/src/ios/CDVLocation.m
@@ -132,8 +132,9 @@
__locationStarted = YES;
if (enableHighAccuracy) {
__highAccuracyEnabled = YES;
- // Set to distance filter to "none" - which should be the minimum for best results.
- self.locationManager.distanceFilter = kCLDistanceFilterNone;
+ // Set distance filter to 5 for a high accuracy. Setting it to "kCLDistanceFilterNone" could provide a
+ // higher accuracy, but it's also just spamming the callback with useless reports which drain the battery.
+ self.locationManager.distanceFilter = 5;
// Set desired accuracy to Best.
self.locationManager.desiredAccuracy = kCLLocationAccuracyBest;
} else {