{ "id": "136204", "key": "TIMOB-17638", "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": [ { "id": "15972", "description": "Release 3.4.0", "name": "Release 3.4.0", "archived": false, "released": true, "releaseDate": "2014-09-28" }, { "id": "16704", "description": "Release 3.5.0", "name": "Release 3.5.0", "archived": false, "released": true, "releaseDate": "2015-01-13" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-09-15T17:35:20.000+0000", "created": "2014-09-07T22:38:37.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "ios8" ], "versions": [], "issuelinks": [ { "id": "41071", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "136195", "key": "AC-1349", "fields": { "summary": "iOS8: Geolocation doesn't work", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "41505", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "137043", "key": "TIMOB-17742", "fields": { "summary": "iOS: Create a better way to request Geo Permissions", "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": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } }, { "id": "41381", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "136537", "key": "TIMOB-17688", "fields": { "summary": "iOS8: Add ability to request Geo Location Permission", "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": "High", "id": "2" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-11-21T20:30:08.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Apple has changed how Location Services Permissions are handled in iOS8. Because of this if iOS8 is the deployment target the Ti SDK Geo functions will stop working.\r\n\r\nApproach on now to fix : https://gist.github.com/benbahrenburg/c4c992c8c61d197510ea\r\n\r\nPR : https://github.com/appcelerator/titanium_mobile/pull/6028", "attachment": [], "flagged": false, "summary": "iOS8: Support New Geo Permissions", "creator": { "name": "ben.bahrenburg@gmail.com", "key": "ben.bahrenburg@gmail.com", "displayName": "Ben Bahrenburg", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "ben.bahrenburg@gmail.com", "key": "ben.bahrenburg@gmail.com", "displayName": "Ben Bahrenburg", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 199, "state": "closed", "name": "2014 Sprint 18 SDK", "startDate": "2014-09-02T22:56:57.421Z", "endDate": "2014-09-13T00:00:00.000Z", "completeDate": "2014-09-15T20:08:19.146Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "322322", "author": { "name": "ben.bahrenburg@gmail.com", "key": "ben.bahrenburg@gmail.com", "displayName": "Ben Bahrenburg", "active": true, "timeZone": "America/Los_Angeles" }, "body": "How to test:\r\n___________________\r\n\r\nTesting Geo AlwaysUsage:\r\n++++++++++++++++++++++++\r\n\r\n1. Using an Ti SDK with this patch applied create a test app ( in classic mode )\r\n2. Update the app.js with this sampel https://gist.github.com/benbahrenburg/c4c992c8c61d197510ea#how-to-test-this\r\n4. Open the tiapp.xml in the ios / plist / dict section add the below:\r\n{code}\r\nNSLocationAlwaysUsageDescription\r\nTest NSLocationAlwaysUsageDescription\r\n{code}\r\n\r\n5. Compile and push to your device or the simulator. Please note you must target iOS8.\r\n6. Press the btnAuthorization button, you should see a message that says Ti.Geolocation.AUTHORIZATION_UNKNOWN\r\n7. Press the btnGeoTest button, you should now see the permission box with the message Test NSLocationAlwaysUsageDescription\r\n8. Press the approve button\r\n9. You should now see the event below fire\r\n{code}\r\nTi.Geolocation.addEventListener('authorization',function(e){\r\n\tTi.API.info('authorization event:' + JSON.stringify(e));\r\n});\r\n{code}\r\n10. Press the btnAuthorization button, you should now see an alert with Ti.Geolocation.AUTHORIZATION_ALWAYS or Ti.Geolocation.AUTHORIZATION_AUTHORIZED\r\n\r\n\r\nTesting Geo In Usage Permission:\r\n++++++++++++++++++++++++\r\n\r\n1. Next reset your simulator or uninstall the app from your device\r\n2. Remove the NSLocationAlwaysUsageDescription settings from your tiapp.xml\r\n3. Open the tiapp.xml in the ios / plist / dict section add the below:\r\n{code}\r\nNSLocationWhenInUseUsageDescription\r\nTest NSLocationWhenInUseUsageDescription\r\n{code}\r\n4. Compile and push to your device or the simulator. Please note you must target iOS8.\r\n5. Press the btnAuthorization button, you should see a message that says Ti.Geolocation.AUTHORIZATION_UNKNOWN\r\n6. Press the btnGeoTest button, you should now see the permission box with the message Test NSLocationWhenInUseUsageDescription\r\n7. Press the approve button\r\n8. You should now see the event below fire\r\n{code}\r\nTi.Geolocation.addEventListener('authorization',function(e){\r\n\tTi.API.info('authorization event:' + JSON.stringify(e));\r\n});\r\n{code}\r\n9. Press the btnAuthorization button, you should now see an alert with Ti.Geolocation.AUTHORIZATION_WHEN_IN_USE\r\n10. Next reset your simulator or uninstall the app from your device\r\n\r\n\r\nTesting what happens if you have both NSLocationWhenInUseUsageDescription and NSLocationAlwaysUsageDescription\r\n++++++++++++++++++++++++\r\n\r\n1. Next reset your simulator or uninstall the app from your device\r\n2. Open the tiapp.xml in the ios / plist / dict section add the below:\r\n{code}\r\nNSLocationWhenInUseUsageDescription\r\nTest NSLocationWhenInUseUsageDescription\r\nNSLocationAlwaysUsageDescription\r\nTest NSLocationAlwaysUsageDescription\r\n{code}\r\n4. Compile and push to your device or the simulator. Please note you must target iOS8.\r\n5. Press the btnAuthorization button, you should see a message that says Ti.Geolocation.AUTHORIZATION_UNKNOWN\r\n6. Press the btnGeoTest button, you should now see the permission box with the message Test NSLocationAlwaysUsageDescription\r\n7. Press the approve button\r\n8. You should now see the event below fire\r\n{code}\r\nTi.Geolocation.addEventListener('authorization',function(e){\r\n\tTi.API.info('authorization event:' + JSON.stringify(e));\r\n});\r\n{code}\r\n9. Press the btnAuthorization button, you should now see an alert with Ti.Geolocation.AUTHORIZATION_ALWAYS or Ti.Geolocation.AUTHORIZATION_AUTHORIZED\r\n10. Next reset your simulator or uninstall the app from your device\r\n\r\nTesting iOS7 Support\r\n++++++++++++++++++++++++\r\n\r\n1. Next reset your simulator or uninstall the app from your device\r\n2. Open the tiapp.xml in the ios / plist / dict section add the below:\r\n{code}\r\nNSLocationWhenInUseUsageDescription\r\nTest NSLocationWhenInUseUsageDescription\r\nNSLocationAlwaysUsageDescription\r\nTest NSLocationAlwaysUsageDescription\r\n{code}\r\n4. Compile and push to your device or the simulator. Please note you must target iOS7.\r\n5. Press the btnAuthorization button, you should see a message that says Ti.Geolocation.AUTHORIZATION_UNKNOWN\r\n6. Press the btnGeoTest button, you should now see the permission box with the text provided as part of the purpose\r\n7. Press the approve button\r\n8. You should now see the event below fire\r\n{code}\r\nTi.Geolocation.addEventListener('authorization',function(e){\r\n\tTi.API.info('authorization event:' + JSON.stringify(e));\r\n});\r\n{code}\r\n9. Press the btnAuthorization button, you should now see an alert with Ti.Geolocation.AUTHORIZATION_ALWAYS or Ti.Geolocation.AUTHORIZATION_AUTHORIZED\r\n", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-09-08T19:07:06.000+0000", "updated": "2014-09-09T19:12:17.000+0000" }, { "id": "322827", "author": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "body": "Any update on this? This is a showstopper.... Geolocation is now totally broken with iOS SDK 8, including on iOS 7 devices", "updateAuthor": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2014-09-10T17:03:48.000+0000", "updated": "2014-09-10T17:05:09.000+0000" }, { "id": "322828", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "It is in progress, but it would be helpful to know if the PR works for you as well. The plan is to have this as part of 3.4.0.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-10T17:05:23.000+0000", "updated": "2014-09-10T17:09:53.000+0000" }, { "id": "323033", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PR Reviewed, approved and merged.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-09-11T09:33:08.000+0000", "updated": "2014-09-11T09:33:08.000+0000" }, { "id": "323120", "author": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master PR: https://github.com/appcelerator/titanium_mobile/pull/6055\r\nBackport 3_4_X PR: https://github.com/appcelerator/titanium_mobile/pull/6059", "updateAuthor": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-11T18:15:29.000+0000", "updated": "2014-09-12T15:30:21.000+0000" }, { "id": "323127", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~cng] did you make the suggested changes on the PR before merging?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-11T18:33:33.000+0000", "updated": "2014-09-11T18:33:33.000+0000" }, { "id": "323468", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested the following code\r\n{code}\r\nvar win = Ti.UI.createWindow({backgroundColor:'white'});\r\n\r\nwin.addEventListener('click', function() {\r\n var authCode = Ti.Geolocation.locationServicesAuthorization;\r\n if (authCode === Ti.Geolocation.AUTHORIZATION_ALWAYS) {\r\n console.log('AUTHORIZATION_ALWAYS');\r\n } else if (authCode === Ti.Geolocation.AUTHORIZATION_WHEN_IN_USE) {\r\n console.log('AUTHORIZATION_WHEN_IN_USE');\r\n } else {\r\n console.log('NOT AUTHORIZED :(');\r\n }\r\n});\r\n\r\nTi.Geolocation.addEventListener('authorization', function(e) {\r\n console.log('AUTHORIZATION');\r\n});\r\n\r\nTi.Geolocation.addEventListener('location', function(e) {\r\n console.log('LOCATION: ' + JSON.stringify(e));\r\n});\r\n\r\nwin.open();\r\n{code}\r\n\r\ntiapp.xml\r\n{code}\r\n\r\n \r\n \r\n NSLocationAlwaysUsageDescription\r\n Optional description here, can be empty\r\n \r\n \r\n \r\n{code}\r\n\r\nh5.Actual result\r\n{code}\r\n[INFO] : AUTHORIZATION\r\n[INFO] : AUTHORIZATION\r\n[INFO] : LOCATION: {\"code\":0,\"success\":true,\"coords\":{\"timestamp\":1410567849959,\"altitude\":23.712186813354492,\"speed\":-1,\"latitude\":37.3895378112793,\"longitude\":-122.05012512207031,\"accuracy\":65,\"altitudeAccuracy\":10,\"heading\":-1},\"bubbles\":true,\"type\":\"location\",\"source\":{},\"cancelBubble\":false}\r\n[INFO] : LOCATION: {\"code\":0,\"success\":true,\"coords\":{\"timestamp\":1410567849961,\"altitude\":23.712186813354492,\"speed\":-1,\"latitude\":37.3895378112793,\"longitude\":-122.05012512207031,\"accuracy\":65,\"altitudeAccuracy\":10,\"heading\":-1},\"bubbles\":true,\"type\":\"location\",\"source\":{},\"cancelBubble\":false}\r\n[INFO] : LOCATION: {\"code\":0,\"success\":true,\"coords\":{\"timestamp\":1410567850001,\"altitude\":23.712186813354492,\"speed\":-1,\"latitude\":37.3895378112793,\"longitude\":-122.05013275146484,\"accuracy\":68.14575958251953,\"altitudeAccuracy\":11.721681594848633,\"heading\":-1},\"bubbles\":true,\"type\":\"location\",\"source\":{},\"cancelBubble\":false}\r\n[INFO] : LOCATION: {\"code\":0,\"success\":true,\"coords\":{\"timestamp\":1410567850005,\"altitude\":23.712186813354492,\"speed\":-1,\"latitude\":37.3895378112793,\"longitude\":-122.05013275146484,\"accuracy\":68.14575958251953,\"altitudeAccuracy\":11.721681594848633,\"heading\":-1},\"bubbles\":true,\"type\":\"location\",\"source\":{},\"cancelBubble\":false}\r\n[INFO] : AUTHORIZATION_ALWAYS\r\n{code}\r\n\r\n\r\ntested environment\r\nMac osx 10.9.4 Maverics\r\nAppcelerator Studio, build: 3.4.0.201409112242\r\nTitanium SDK, build: 3.4.0.v20140912160914\r\nacs@1.0.16\r\nalloy 1.5.0-rc\r\ninstall@0.1.7\r\nnpm@1.4.23\r\nsudo@1.0.3\r\ntitanium 3.4.0-rc2\r\ntitanium-code-processor@1.1.1\r\nXcode6\r\nDevice: iPhone 5S iOS8\r\n", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-13T00:32:17.000+0000", "updated": "2014-09-13T00:32:17.000+0000" }, { "id": "323490", "author": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "body": "Not sure if this requires a new ticket - so someone advice;\r\n\r\nI have the same permission issues but for Beacons, they fall into the Geo family if I am correct. I have zero problems on iOS7 xcode 5, but iOS8 xcode 6 nothing - permission warning \"Location services not authorised\" stops everything in its tracks.\r\n\r\nI have added the extra tiapp.xml ios entries noted above and in the example app and included the button to test the current state - it shows the \"AUTHORIZATION_UNKNOWN\" entry. But then requesting the beacon ranging and such does not trigger a permission dialog.\r\n\r\nIf I use the Apple settings app and change the permission manually the beacons are found. So this must be a simple lack of triggering in the mix.", "updateAuthor": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "created": "2014-09-13T14:06:46.000+0000", "updated": "2014-09-13T14:06:46.000+0000" }, { "id": "323503", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Comment from [~cng]. Thoughts appreciated:\r\n\r\nIn this ticket, app triggers for location service authorization only when developer calls getCurrentPosition(). Similarly, TIMOB-17665 also wants to trigger for location service authorization when userLocation is set. And now, from [~core13]'s description, beacon needs this authorization too.\r\n\r\nI’m just thinking if we should just create a new general method called requestLocationServicesAuthorization(authorizationType). And update titanium documents to inform developers to call this method whenever location services is required for iOS8. This way it will cover the above scenarios, including others we may not have explicitly covered.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-13T17:28:23.000+0000", "updated": "2014-09-13T17:28:23.000+0000" }, { "id": "324800", "author": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This implementation works fine for now. Lets close this ticket and create a new linked ticket to improve it as mentioned above.", "updateAuthor": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-19T22:16:58.000+0000", "updated": "2014-09-19T22:16:58.000+0000" }, { "id": "325119", "author": { "name": "sfeather", "key": "sfeather", "displayName": "Stephen Feather", "active": true, "timeZone": "America/New_York" }, "body": "Jon,\r\n\r\nDo we have a new ticket to watch regarding the beacon permissions?", "updateAuthor": { "name": "sfeather", "key": "sfeather", "displayName": "Stephen Feather", "active": true, "timeZone": "America/New_York" }, "created": "2014-09-23T10:51:29.000+0000", "updated": "2014-09-23T10:51:29.000+0000" }, { "id": "325227", "author": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~sfeather] TIMOB-17742", "updateAuthor": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-23T18:41:09.000+0000", "updated": "2014-09-23T18:41:09.000+0000" }, { "id": "325266", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as fixed, tested using\r\nMac osx 10.9.5 Mavericks\r\nAppcelerator Studio, build: 3.4.0.201409161950\r\nTitanium SDK, build: 3.4.0.v20140923111716\r\nacs@1.0.16\r\nalloy 1.5.0-rc2\r\ninstall@0.1.7\r\nnpm@1.4.23\r\nsudo@1.0.3\r\ntitanium 3.4.0-rc4\r\ntitanium-code-processor@1.1.1\r\nXcode6.0.1 (6A317)\r\nDevices:\r\niPhone 6 iOS 8\r\niPhone 6+ iOS 8", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-23T21:18:38.000+0000", "updated": "2014-09-23T21:18:38.000+0000" }, { "id": "325327", "author": { "name": "sfeather", "key": "sfeather", "displayName": "Stephen Feather", "active": true, "timeZone": "America/New_York" }, "body": "thank you john.", "updateAuthor": { "name": "sfeather", "key": "sfeather", "displayName": "Stephen Feather", "active": true, "timeZone": "America/New_York" }, "created": "2014-09-24T01:20:17.000+0000", "updated": "2014-09-24T01:20:17.000+0000" } ], "maxResults": 21, "total": 21, "startAt": 0 } } }