{ "id": "122021", "key": "TIMOB-15761", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2013-11-04T11:51:41.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "SupportTeam" ], "versions": [ { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:03:36.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "If you set the accuracy of Ti.Geolocation to ACCURACY_BEST or ACCURACY_HIGH before adding an eventlistener to Ti.Geolocation, the accuracy is actually set to \r\nACCURACY_THREE_KILOMETERS.\r\n\r\nIt is caused because ACCURACY_BEST and ACCURACY_HIGH have the value of -1 and there is a check for accuracy not being -1 (because in the past it could only be 0 or greater?) in GeolocationModule.m\r\n\r\nThe workaround is to set ACCURACY_BEST or ACCURACY_HIGH again after adding an eventlistener, but it took us 3 weeks to find this. Either document this in the docs or change this behavior, but I can not believe this is intended.\r\n\r\nSDK: 3.2.0.v20131010124846\r\n\r\nGeolocationModule.m - line 284:\r\n{code}\r\n-(CLLocationManager*)locationManager\r\n{\r\n\t[lock lock];\r\n\tif (locationManager==nil)\r\n\t{\r\n\t\tRELEASE_TO_NIL(tempManager);\r\n\t\tlocationManager = [[CLLocationManager alloc] init];\r\n\t\tlocationManager.delegate = self;\r\n\t\tif (!trackSignificantLocationChange) {\r\n if (accuracy!=-1)\r\n {\r\n locationManager.desiredAccuracy = accuracy;\r\n }\r\n else\r\n {\r\n locationManager.desiredAccuracy = kCLLocationAccuracyThreeKilometers;\r\n }\r\n locationManager.distanceFilter = distance;\r\n }\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: Geolocation: Setting ACCURACY_BEST or ACCURACY_HIGH before adding eventlistener sets ACCURACY_THREE_KILOMETERS", "creator": { "name": "timanrebel", "key": "timanrebel", "displayName": "Timan Rebel", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "timanrebel", "key": "timanrebel", "displayName": "Timan Rebel", "active": true, "timeZone": "Europe/London" }, "environment": null, "comment": { "comments": [], "maxResults": 0, "total": 0, "startAt": 0 } } }