{ "id": "144390", "key": "AC-997", "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": "2015-09-29T01:52:23.000+0000", "created": "2015-02-08T12:34:06.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:37:19.000+0000", "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" } }, "components": [ { "id": "14544", "name": "Alloy", "description": "Please enter tickets related to the Alloy here." } ], "description": "Steps to replicate:\r\n\r\nAfter modifying my TiAPP editor, and adding this to enable location services:\r\n\r\n NSLocationAlwaysUsageDescription\r\n\t\t\t\tApp requires this to be enabled.\r\n NSLocationWhenInUseUsageDescription\r\n\t\t\t\tApp requires this to be enabled.\r\n\r\nI find that after running the app in a simulator for the first time a dialog box pops up, if i press \"always allow\" it works. However, if I close the simulator, then re run it, location services are not running for the app. I have to manually go to debug > location > select a location\r\n\r\nThis was working fine before.\r\n\r\nAny idea why this is happening, thanks\r\n\r\n\r\nSimple Test case:\r\n\r\n1) create new alloy project\r\n\r\n2)Modify tiapp.xml file\r\n\r\n\r\n\r\n com.testLocationServices\r\n testLocationServices\r\n 1.0\r\n ss\r\n http://\r\n \r\n 2015 by ss\r\n appicon.png\r\n false\r\n false\r\n true\r\n eec6a952-5cf4-42e8-974d-36868fb64701\r\n dp\r\n \r\n \r\n \r\n UISupportedInterfaceOrientations~iphone\r\n \r\n UIInterfaceOrientationPortrait\r\n \r\n UISupportedInterfaceOrientations~ipad\r\n \r\n UIInterfaceOrientationPortrait\r\n UIInterfaceOrientationPortraitUpsideDown\r\n UIInterfaceOrientationLandscapeLeft\r\n UIInterfaceOrientationLandscapeRight\r\n \r\n UIRequiresPersistentWiFi\r\n \r\n UIPrerenderedIcon\r\n \r\n UIStatusBarHidden\r\n \r\n UIStatusBarStyle\r\n UIStatusBarStyleDefault\r\n NSLocationUsageDescription\r\n app requires this to be enabled.\r\n NSLocationAlwaysUsageDescription\r\n app requires this to be enabled.\r\n NSLocationWhenInUseUsageDescription\r\n app requires this to be enabled.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n true\r\n true\r\n \r\n default\r\n \r\n \r\n \r\n true\r\n false\r\n true\r\n true\r\n true\r\n \r\n 3.4.1.v20141001062512\r\n \r\n ti.alloy\r\n \r\n\r\n\r\nadd the following lines into tiapp.xml to enable location services (as above)\r\n\r\n NSLocationUsageDescription\r\n app requires this to be enabled.\r\n NSLocationAlwaysUsageDescription\r\n app requires this to be enabled.\r\n NSLocationWhenInUseUsageDescription\r\n app requires this to be enabled.\r\n\r\n\r\nController:\r\n\r\nindex.js\r\n\r\nTitanium.Geolocation.addEventListener('location', function(e) {\r\n\tif (e.error) {\r\n\t\talert(e.error);\r\n\r\n\t} else {\r\n\t\tTi.API.info(e.coords);\r\n\r\n\t}\r\n});\r\n\r\nRun in ioS 8.1 simulator iphone 6.\r\nCompiled in SDK 3.4.1\r\n\r\nYou will get a authorisation dialog box when you first start the app, after accepting ok, location services are not turned on and the error alert fires.", "attachment": [], "flagged": false, "summary": "Location services doesn't always work", "creator": { "name": "maveick2k", "key": "maveick2k", "displayName": "Samie Syed", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "maveick2k", "key": "maveick2k", "displayName": "Samie Syed", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium alloy SDK v3.4.1, iOS", "comment": { "comments": [ { "id": "342502", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "body": "Hi,\r\n\r\nPlease provide a simple test case to reproduce your problem. That will be real helpful to address the problem. Thanks\r\n\r\nRegards,\r\nShuo", "updateAuthor": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2015-02-09T00:50:27.000+0000", "updated": "2015-02-09T00:50:27.000+0000" }, { "id": "343457", "author": { "name": "maveick2k", "key": "maveick2k", "displayName": "Samie Syed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Done", "updateAuthor": { "name": "maveick2k", "key": "maveick2k", "displayName": "Samie Syed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-02-15T17:44:05.000+0000", "updated": "2015-02-15T17:44:05.000+0000" }, { "id": "343458", "author": { "name": "maveick2k", "key": "maveick2k", "displayName": "Samie Syed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "See edit.", "updateAuthor": { "name": "maveick2k", "key": "maveick2k", "displayName": "Samie Syed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-02-15T17:44:15.000+0000", "updated": "2015-02-15T17:44:15.000+0000" }, { "id": "343461", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "body": "The test case should include the following content, please review. Thanks.\r\n[http://docs.appcelerator.com/titanium/3.0/#!/guide/How_to_Submit_a_Bug_Report-section-29004732_HowtoSubmitaBugReport-CreatingaTestCase]", "updateAuthor": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2015-02-16T00:55:35.000+0000", "updated": "2015-02-16T00:55:35.000+0000" }, { "id": "343482", "author": { "name": "maveick2k", "key": "maveick2k", "displayName": "Samie Syed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "changed it.", "updateAuthor": { "name": "maveick2k", "key": "maveick2k", "displayName": "Samie Syed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-02-16T04:34:30.000+0000", "updated": "2015-02-16T04:34:30.000+0000" }, { "id": "343517", "author": { "name": "maveick2k", "key": "maveick2k", "displayName": "Samie Syed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Seems like someone else has experienced the same problem here:\r\n\r\nhttps://developer.appcelerator.com/question/178407/ios8-with-ti-340-sdk-getcurrentposition-error-the-operation-couldnt-be-completed\r\n\r\nAnd was unable to resolve it. Appcelerator can you help please, thanks.", "updateAuthor": { "name": "maveick2k", "key": "maveick2k", "displayName": "Samie Syed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-02-16T23:12:34.000+0000", "updated": "2015-02-16T23:12:56.000+0000" }, { "id": "362473", "author": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello,\r\n\r\nIt's not an issue. It's a default behavior of simulator or device if you don't allow anything to the App launch. Next time, you have to manually permission this otherwise it will not work. For doing that Settings>> APP_NAME>> Then enable permission.\r\n\r\nThanks.", "updateAuthor": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-09-08T05:37:49.000+0000", "updated": "2015-09-29T01:51:56.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }