[TIMOB-15088] Geolocation Accuracy sometimes resets from ACCURACY_BEST to ACCURACY_THREE_KILOMETERS
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Low |
| Status | Open |
| Resolution | Unresolved |
| Affected Version/s | Release 3.1.2 |
| Fix Version/s | n/a |
| Components | iOS |
| Labels | n/a |
| Reporter | Gordon Illan |
| Assignee | Unknown |
| Created | 2013-09-07T22:05:25.000+0000 |
| Updated | 2018-02-28T20:03:18.000+0000 |
Description
Given that Ti.Geolocation.ACCURACY_BEST is defined as -1, the following code starting at line 275 in GeolocationModule.m, sometimes changes ACCURACY_BEST to ACCURACY_THREE_KILOMETERS.
-(CLLocationManager*)locationManager
{
[lock lock];
if (locationManager==nil)
{
RELEASE_TO_NIL(tempManager);
locationManager = [[CLLocationManager alloc] init];
locationManager.delegate = self;
if (!trackSignificantLocationChange) {
if (accuracy!= ACCURACY_BEST) // -1
{
locationManager.desiredAccuracy = accuracy;
}
else
{
locationManager.desiredAccuracy = ACCURACY_THREE_KILOMETERS; //kCLLocationAccuracyThreeKilometers
}
locationManager.distanceFilter = distance;
}
...
If you set the accuracy to ACCURACY_BEST before adding the event listener, then it's changed to ACCURACY_THREE_KILOMETERS.
This issue was brought up by Ondrej Urik in a comment @ https://developer.appcelerator.com/question/116986
Why is this a low priority? It's been there for 3 major versions and looks like a simple fix.