{ "id": "137098", "key": "AC-1248", "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": "11", "description": "Is not a bug in our product", "name": "Not Our Bug" }, "resolutiondate": "2014-09-24T22:50:27.000+0000", "created": "2014-09-24T00:35:36.000+0000", "labels": [ "App", "Geolocation", "Location", "LocationServices", "Services", "Settings", "SettingsApp", "Studio", "TCSupportTriage", "Ti.Geolocation", "Titanium", "TitaniumStudio3.4", "iOS8" ], "versions": [], "issuelinks": [], "assignee": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "updated": "2016-03-08T07:37:38.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": [], "description": "Using Titanium Studio 3.3.x, Ti.Geolocation worked flawlessly for iPhone 5S running iOS 7. But just today, I upgraded this iPhone 5S to iOS 8 and Ti.Geolocation can't getCurrentLocation. I turned on the Location Services in the iOS 8 Settings app but it doesn't save the setting configuration for my specific app. I would indicate \"Always\" for Location Services and switch back to my app. By the time I get to my app, the Location Services turns off automatically and I haven't even really pressed or swiped or did anything. And when I go back to the Settings app to check the location setting for my my app, the setting configuration wasn't saved at all and neither \"Never\" or \"Always\" were checked. This is this same with Titanium Studio 3.4.x", "attachment": [ { "id": "51565", "filename": "Before_saving.jpg", "author": { "name": "jhrockwell", "key": "jhrockwell", "displayName": "June Rockwell", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-24T00:35:36.000+0000", "size": 12799, "mimeType": "image/jpeg" }, { "id": "51566", "filename": "didnt_save.jpg", "author": { "name": "jhrockwell", "key": "jhrockwell", "displayName": "June Rockwell", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-24T00:35:36.000+0000", "size": 10660, "mimeType": "image/jpeg" } ], "flagged": false, "summary": "iOS 8 Location Services Incompatibility", "creator": { "name": "jhrockwell", "key": "jhrockwell", "displayName": "June Rockwell", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jhrockwell", "key": "jhrockwell", "displayName": "June Rockwell", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium Studio 3.4.0", "closedSprints": [ { "id": 126, "state": "closed", "name": "2018 Sprint 05 SDK", "startDate": "2018-02-25T19:38:08.926Z", "endDate": "2018-03-11T18:38:00.000Z", "completeDate": "2018-03-11T22:06:01.520Z", "originBoardId": 100 } ], "comment": { "comments": [ { "id": "325383", "author": { "name": "ahossain", "key": "ahossain", "displayName": "Amimul Hossain", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, [~jhrockwell] According to the Titanium Location service Documentation [iOS Development Considerations|http://docs.appcelerator.com/titanium/latest/#!/guide/Tracking_Position_and_Heading-section-29004915_TrackingPositionandHeading-iOSDevelopmentConsiderations] Starting with iOS 8, to use location services, you need to add either the NSLocationWhenInUseUsageDescription or NSLocationAlwaysUsageDescription key to the iOS plist section of the project's tiapp.xml file.\r\n\r\nh5. CODE SEGMENT\r\n{code}\r\n\r\n \r\n \r\n \r\n NSLocationAlwaysUsageDescription\r\n \r\n Specify the reason for accessing the user’s location information.\r\n This appears in the alert dialog when asking the user for permission to\r\n access their location.\r\n \r\n \r\n \r\n \r\n\r\n{code}\r\n\r\nI have tested the Titanium location service API in iOS 8.0 Device, with the above code section in tiapp.xml file. it's working fine. Once the location service is enabled in an app, it remains enabled. Thanks.\r\n\r\n\r\n\r\n\r\n\r\n\r\n", "updateAuthor": { "name": "ahossain", "key": "ahossain", "displayName": "Amimul Hossain", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2014-09-24T07:04:54.000+0000", "updated": "2014-09-24T07:04:54.000+0000" }, { "id": "325432", "author": { "name": "jhrockwell", "key": "jhrockwell", "displayName": "June Rockwell", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@Amimul Hossain thanks. The settings configuration in the Settings app now save. But when the user first installs the app, do they have to go to the iOS Settings App to save the configuration or by adding NSLocationAlwaysUsageDescription or NSLocationWhenInUseUsageDescription the settings should be automatically saved in the Settings App without the user having to set the configurations?\r\n\r\nRight now, after trying it, I have to go the Settings App and set the configuration. Is this ideal?", "updateAuthor": { "name": "jhrockwell", "key": "jhrockwell", "displayName": "June Rockwell", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-24T15:46:05.000+0000", "updated": "2014-09-24T15:46:05.000+0000" }, { "id": "325465", "author": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi [~jhrockwell], I have put together a little sample to test your issue. Please follow the instructions below.\r\n\r\n# Create a new app\r\n# Paste the example code below into your app.js\r\n# Add the code segment posted by [~ahossain] into your `tiapp.xml`\r\n# Run the app\r\n# When the app launches, click the 'getCurrentPostion' button\r\n# You should see an alert dialog asking if you would like to allow the app access to your location... click 'Allow'.\r\n# You should now see a JSON string of your current position in the middle of the screen.\r\n# You can also test what will happen when you click 'Don't Allow' by deleting your app from your device and reinstalling the app. After doing this it will prompt you to allow again.\r\n\r\nKeep an eye on your device log while testing this to see if there are any helpful log messages. Let me know how it goes.\r\n\r\n{code:title=app.js}\r\nvar win = Ti.UI.createWindow({backgroundColor:'#FFF'});\r\nwin.open();\r\n\r\nvar button = Ti.UI.createButton({\r\n\ttitle:'getCurrentPosition',\r\n\ttop: 10, height: 50,\r\n\tleft: 10, right: 10\r\n});\r\nwin.add(button);\r\nbutton.addEventListener('click', function() {\r\n\tTi.Geolocation.getCurrentPosition(function(e) {\r\n\t\tvar loc = JSON.stringify(e);\r\n\t\tlabel.text = loc;\r\n\t\tTi.API.info('getCurrentPosition: ' + loc);\r\n\t});\r\n});\r\n\r\nvar label = Ti.UI.createLabel({\r\n\ttop: 70,\r\n\tbottom: 10,\r\n\tleft: 10,\r\n\tright: 10,\r\n\ttext: 'log'\r\n});\r\nwin.add(label);\r\n{code}", "updateAuthor": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-24T17:55:56.000+0000", "updated": "2014-09-24T17:57:02.000+0000" }, { "id": "325486", "author": { "name": "jhrockwell", "key": "jhrockwell", "displayName": "June Rockwell", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@Jon Alter, thanks! I forgot to update some things on the SDK. Your instructions helped a lot in me figuring out what I've missed.", "updateAuthor": { "name": "jhrockwell", "key": "jhrockwell", "displayName": "June Rockwell", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-24T19:08:43.000+0000", "updated": "2014-09-24T19:08:43.000+0000" }, { "id": "325489", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "[~jhrockwell]: Based on your last comment. Does this work for you now? Do you agree to close this issue? ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2014-09-24T19:12:22.000+0000", "updated": "2014-09-24T19:12:22.000+0000" }, { "id": "325500", "author": { "name": "jhrockwell", "key": "jhrockwell", "displayName": "June Rockwell", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Yes, it works now. The issue is resolved. Thank you all for your help!", "updateAuthor": { "name": "jhrockwell", "key": "jhrockwell", "displayName": "June Rockwell", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-24T20:45:26.000+0000", "updated": "2014-09-24T20:45:26.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }