{ "id": "136077", "key": "TIMOB-17641", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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-15T16:10:50.000+0000", "created": "2014-09-03T23:30:39.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "ios8" ], "versions": [], "issuelinks": [], "assignee": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2015-05-06T20:18:27.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": "Add a property to return the application setting URL on iOS 8 so that we can use Ti.Platform.openURL to launch directly into that screen.\r\n\r\nFor example:\r\n\r\n{code}\r\n\tvar settingsURL = Ti.App.iOS.ApplicationOpenSettingsURL;\r\n\tif(settingsURL != undefined) {\r\n\t\tif(Ti.Platform.canOpenURL(settingsURL)) {\r\n\t\t\tTi.Platform.openURL(settingsURL);\t\r\n\t\t} else {\r\n\t\t\talert('cannot open URL');\r\n\t\t}\t\t\r\n\t}\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS8: Add UIApplicationOpenSettingsURLString Support", "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": "321822", "author": { "name": "ben.bahrenburg@gmail.com", "key": "ben.bahrenburg@gmail.com", "displayName": "Ben Bahrenburg", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Added pull request https://github.com/appcelerator/titanium_mobile/pull/6017\r\n\r\nIngo mentioned AppC is now taking iOS8 PR. This ticket was created in associated with PR 6017.", "updateAuthor": { "name": "ben.bahrenburg@gmail.com", "key": "ben.bahrenburg@gmail.com", "displayName": "Ben Bahrenburg", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-04T15:19:23.000+0000", "updated": "2014-09-04T16:07:39.000+0000" }, { "id": "321841", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~mpmiranda], for iOS 8 tickets, add a label of \"ios8\" and make sure the summary _starts_ with iOS8 (no spaces)", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-04T16:47:13.000+0000", "updated": "2014-09-04T16:47:13.000+0000" }, { "id": "322317", "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\n1. Using a Ti SDK with this PR included create a Titanium app.\r\n\r\n2. Select iOS8 as the target.\r\n\r\n3. Copy the below into the app.js\r\n\r\n{code}\r\nvar win = Titanium.UI.createWindow({ \r\n backgroundColor:'#fff',layout:'vertical'\r\n});\r\n\r\nvar btnSettingsURL = Titanium.UI.createButton({\r\n title:'Settings URL Test', left:25,right:25, top:80\r\n});\r\nwin.add(btnSettingsURL);\r\n\r\nbtnSettingsURL.addEventListener('click',function(d){\r\n\tvar settingsURL = Ti.App.iOS.ApplicationOpenSettingsURL;\r\n\tif(settingsURL!=undefined){\r\n\t if(Ti.Platform.canOpenURL(settingsURL)){\r\n\t Ti.Platform.openURL(settingsURL);\r\n\t }else{\r\n\t \talert('cannot open URL');\r\n\t \t}\r\n\t}else{\r\n\t\talert('undefined results for ApplicationOpenSettingsURL are you using iOS7 or lower?');\r\n\t}\r\n});\r\n\r\nwin.open();\r\n{code}\r\n\r\n4. Press the button, you should then be taken to the privacy settings for your app\r\n\r\n5. Close simulator or remove app from device\r\n\r\n6. Update your Titanium test project to target iOS7\r\n\r\n7. Launch in simulator or push to device\r\n\r\n8. Press the test button, you should now get a message stating that ApplicationOpenSettingsURL is undefined. This is due to iOS7 not supporting this property.", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-09-08T18:45:20.000+0000", "updated": "2014-09-09T19:11:04.000+0000" }, { "id": "322602", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Can you take a look?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-09T19:11:05.000+0000", "updated": "2014-09-09T19:11:05.000+0000" }, { "id": "323150", "author": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR master: https://github.com/appcelerator/titanium_mobile/pull/6060\r\nPR 3_4_X: https://github.com/appcelerator/titanium_mobile/pull/6061", "updateAuthor": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-11T20:17:49.000+0000", "updated": "2014-09-11T20:17:49.000+0000" }, { "id": "323582", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Using Ben's code, the settingsURL is undefined even for iOS SDK 8 target.\r\nTested On:\r\nSDK: 3.4.0.v20140913174915\r\nStudio: 3.4.0.201409131030\r\nCLI: 3.4.0-rc3\r\nAlloy: 1.5.0-rc2\r\nXcode: Xcode 6 GM seed\r\nDevice: iPhone 5s (v8.0 GM)", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-15T06:09:10.000+0000", "updated": "2014-09-15T06:09:10.000+0000" }, { "id": "323588", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Ben's sample code has to be updated, Application should be small 'a' in Ti.App.iOS.applicationOpenSettingsURL.\r\nPlease use this instead.\r\n\r\n{code}\r\nvar win = Titanium.UI.createWindow({ \r\n backgroundColor:'#fff',layout:'vertical'\r\n});\r\n\r\nvar btnSettingsURL = Titanium.UI.createButton({\r\n title:'Settings URL Test', left:25,right:25, top:80\r\n});\r\nwin.add(btnSettingsURL);\r\n\r\nbtnSettingsURL.addEventListener('click',function(d){\r\n\tvar settingsURL = Ti.App.iOS.applicationOpenSettingsURL;\r\n\tif(settingsURL!=undefined){\r\n\t if(Ti.Platform.canOpenURL(settingsURL)){\r\n\t Ti.Platform.openURL(settingsURL);\r\n\t }else{\r\n\t \talert('cannot open URL');\r\n\t \t}\r\n\t}else{\r\n\t\talert('undefined results for applicationOpenSettingsURL are you using iOS7 or lower?');\r\n\t}\r\n});\r\n\r\nwin.open();\r\n{code}\r\n", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-09-15T07:06:21.000+0000", "updated": "2014-09-15T07:15:55.000+0000" }, { "id": "323592", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The Ti.App.iOS.ApplicationOpenSettingsURL works as expected. Tested using the updated code and instruction mentioned by Ben.\r\n\r\nTested On:\r\nSDK: 3.4.0.v20140913174915\r\nStudio: 3.4.0.201409131030\r\nCLI: 3.4.0-rc3\r\nAlloy: 1.5.0-rc2\r\nXcode: Xcode 6 GM seed", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-15T07:28:05.000+0000", "updated": "2014-09-15T07:28:05.000+0000" }, { "id": "351839", "author": { "name": "alvesl", "key": "alvesl", "displayName": "Lucas Alves", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hello,\r\n\r\nUsing the provided code enables me to open the APP'S SETTINGS - just like documentation says:\r\n_Returns a URL to open the app's settings._\r\n\r\nThe problem is that this is not the most common behavior if you're trying to turn LOCATION SERVICES back on, for example, using the current method you'll need to go back from the App's settings into -> Select Privacy -> Select Location services.\r\nThis is horrible from the user's point of view, because he/she might try to enable Location services from within the app's settings, but if it was turned off from the privacy page, iOS won't allow the user to change it back on (hence the above path is needed).\r\n\r\nThat being said, pretty much all the apps that depend on Location Services (Hotel Tonight, Foursquare, Dojo, etc.) are able to launch the Location Services page (Child of Privacy) DIRECTLY. My question is: Is it possible to open the settings page directly with this String? If Not, shouldn't there be another string for it?\r\n\r\nThanks a lot - I know it's a little out of ordinary to ask questions here, but this might also be a bug, since from a quick research the apps used the same exact string for a different behavior in Objective-C.\r\n", "updateAuthor": { "name": "alvesl", "key": "alvesl", "displayName": "Lucas Alves", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-05-06T20:18:27.000+0000", "updated": "2015-05-06T20:18:27.000+0000" } ], "maxResults": 11, "total": 11, "startAt": 0 } } }