{ "id": "114924", "key": "AC-1837", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2013-06-13T16:47:16.000+0000", "created": "2013-05-24T18:11:05.000+0000", "labels": [ "bug", "geolocation", "ios" ], "versions": [], "issuelinks": [ { "id": "29541", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "104715", "key": "TIMOB-11831", "fields": { "summary": "iOS: GPS icon not turning off when app enters background", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "updated": "2016-03-08T07:40:44.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "*Problem description*\r\nGeolocation icon (\"arrow\") is visible in iPhone status bar, but there are no listeners attached to Ti.Geolocation. Location services seems to be active and consuming battery. The icon disappears only after uninstalling the app. Killing it is useless.\r\n\r\nAlso, in console log there is a line:\r\n{code}\r\nMay 24 21:56:22 Ilya-Shapovalovs-iPhone locationd[46] : Location icon should now be in state 'Active'\r\n{code}\r\nAnd there should be line with \"Location icon should now be in state 'Inactive'\", but there isn't.\r\n\r\nThis problem was encountered by end users of the app at first (so, it covers different versions of iOS and different iPhone models).\r\n\r\n*Steps to reproduce*\r\n1. create new project - titanium - single window application\r\n2. Insert following code in app.js or ApplicationWindow.js:\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor : \"#FFF\"\r\n});\r\n\r\n//Ti.Geolocation.trackSignificantLocationChange = true; - tried this one also. In log there is a couple of \"cb\", a couple of \"timeout\" but the rest of the log is same (it's provided below)\r\n\r\nTi.Geolocation.accuracy = Ti.Geolocation.ACCURACY_LOW;\r\nvar cb = function() {\r\n\tconsole.log('cb');\r\n\r\n\tif (false) { // immediate removal of listener does not solve my issue, either\r\n\t\tTi.Geolocation.removeEventListener('location', cb);\r\n\t} else {\r\n\t\tsetTimeout(function() {\r\n\t\t\tconsole.log('timeout');\r\n\t\t\tTi.Geolocation.removeEventListener('location', cb);\r\n\t\t}, 3000);\r\n\t}\r\n}\r\nTi.Geolocation.addEventListener('location', cb);\r\n\r\nwin.open();\r\n{code}\r\n\r\n*Log*\r\n{code}\r\nMay 24 22:03:26 Ilya-Shapovalovs-iPhone testgeo[1541] : [DEBUG] Application booted in 1071.326017 ms\r\nMay 24 22:03:27 Ilya-Shapovalovs-iPhone testgeo[1541] : [INFO] cb\r\nMay 24 22:03:28 Ilya-Shapovalovs-iPhone locationd[46] : Location icon should now be in state 'Active'\r\nMay 24 22:03:28 Ilya-Shapovalovs-iPhone awdd[1548] : libMobileGestalt copySystemVersionDictionaryValue: Could not lookup ReleaseType from system version dictionary\r\nMay 24 22:03:28 Ilya-Shapovalovs-iPhone awdd[1548] : CoreLocation: CLClient is deprecated. Will be obsolete soon.\r\nMay 24 22:03:30 Ilya-Shapovalovs-iPhone locationd[46] : received EBUSY, try kScanTypeChannel, channel, 6, rssi -60, delayed 0.000s\r\nMay 24 22:03:30 Ilya-Shapovalovs-iPhone testgeo[1541] : [INFO] timeout\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: geolocation is active when there are no listeners attached", "creator": { "name": "shepik", "key": "shepik", "displayName": "Ilya Shapovalov", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "shepik", "key": "shepik", "displayName": "Ilya Shapovalov", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "iPhone 4, iOS 6.1.3, SDK 3.1.1.v20130516183044 and SDK 3.1.0.GA", "comment": { "comments": [ { "id": "254116", "author": { "name": "shepik", "key": "shepik", "displayName": "Ilya Shapovalov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The problem exsists in master, too (commit 16c168ec582446015bc7d0f0dd6c8ddbcb05c7bb)\n\nAs a temporary workaround, I added the following code to GeolocationModule.m:\n{code}\n-(void)forceStop:(id)arg\n{\n CLLocationManager *lm = [self locationManager];\n [lm stopMonitoringSignificantLocationChanges];\n [lm stopUpdatingLocation];\n [self shutdownLocationManager];\n trackingLocation = NO;\n trackingHeading = NO;\n}\n{code}\n\nAnd now if i manually call Ti.Geolocation.forceStop(), geolocation icon disappears from status bar within 5..10 seconds.\n\n\nI also unsuccessfully tried to call (not documented) method Ti.Geolocation.restart(), and (unsuccessfully either) tried code like this:\n{code}\n [locationManager stopMonitoringSignificantLocationChanges];\n [locationManager stopUpdatingLocation];\n [self shutdownLocationManager];\n trackingLocation = NO;\n trackingHeading = NO;\n{code}", "updateAuthor": { "name": "shepik", "key": "shepik", "displayName": "Ilya Shapovalov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-27T19:31:10.000+0000", "updated": "2013-05-27T19:31:10.000+0000" }, { "id": "256871", "author": { "name": "shepik", "key": "shepik", "displayName": "Ilya Shapovalov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I hope I will get a response. I definitely will, of course, in due course. At the appropriate juncture. When the moment is ripe. In the fullness of time.\nI will, guys, right? Guys? Anyone?", "updateAuthor": { "name": "shepik", "key": "shepik", "displayName": "Ilya Shapovalov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-10T12:38:46.000+0000", "updated": "2013-06-10T12:38:46.000+0000" }, { "id": "257642", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Cannot reproduce on iOS 6 simulator, iPad 3 or iPhone 4 with 3.1 GA or 3.2 CI.\r\n\r\nThe Geolocation indicator turns off after roughly 10 seconds with both immediate removal and timeout removal.\r\n\r\nAs concluded in TIMOB-11831, please make sure that you turn off everything related to Geolocation, including trackSignificantLocationChange.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-13T16:47:16.000+0000", "updated": "2013-06-13T16:47:16.000+0000" }, { "id": "281083", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Closed by TIMOB-11831 ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2013-11-24T23:46:48.000+0000", "updated": "2013-11-24T23:46:48.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }