{ "id": "163172", "key": "TIMOB-23896", "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": "18253", "name": "Release 5.5.0", "archived": false, "released": true, "releaseDate": "2016-09-13" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-09-13T00:01:12.000+0000", "created": "2016-09-12T17:02:30.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2016-09-14T22:14:33.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": "We should be able to get notified when a new URL scheme is handled by the application delegate.", "attachment": [], "flagged": false, "summary": "iOS: Add Ti.App.iOS \"handleurl\" event to handle incoming URL schemes", "creator": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "closedSprints": [ { "id": 707, "state": "closed", "name": "2016 Sprint 19 SDK", "startDate": "2016-09-10T00:17:15.164Z", "endDate": "2016-09-24T00:17:00.000Z", "completeDate": "2016-09-26T05:17:04.253Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "395910", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Will be fixed as part of TIMOB-23890 and also provides a solution for TIMOB-23884.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-12T17:35:46.000+0000", "updated": "2016-09-12T18:13:42.000+0000" }, { "id": "395917", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Demo-code: https://gist.github.com/hansemannn/d2263475b40469d3f2e4b82f03cc345c", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-12T18:16:28.000+0000", "updated": "2016-09-12T18:16:28.000+0000" }, { "id": "395958", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Updated the sample code here:\r\n{code}\r\nvar safari = require('ti.safaridialog');\r\n\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: 'white'\r\n})\r\n\r\nvar btn = Ti.UI.createButton({\r\n title: \"Open safari dialog\"\r\n});\r\n\r\nbtn.addEventListener(\"click\", function() {\r\n safari.open({\r\n url:\"http://hans-knoechel.de/TIMOB-23884.php\",\r\n title:\"Hello World\"\r\n });\r\n});\r\n\r\nTi.App.iOS.addEventListener(\"handleurl\", function(e) {\r\n // If the handled url is provided by the safari-dialog, close it (use-case for OAuth)\r\n if (e.launchOptions.source == \"com.apple.SafariViewService\") {\r\n safari.close();\r\n }\r\n});\r\n\r\nwin.add(btn);\r\nwin.open();\r\n{code}\r\n[~hansknoechel] But when i click on \"Open Test App\", I get \"Safari cannot open the page because the address is invalid\". Not sure what to expect here?", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-09-12T23:26:18.000+0000", "updated": "2016-09-12T23:26:18.000+0000" }, { "id": "395959", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Your tiapp.xml must be able to handle the url-scheme {{safaritest://}}, so you need the following in there:\r\n\r\n{code:xml}\r\n\r\n \r\n \r\n CFBundleURLTypes\r\n \r\n \r\n CFBundleURLName\r\n com.appc.safaridialogtest\r\n CFBundleURLSchemes\r\n \r\n safaritest\r\n \r\n \r\n \r\n \r\n \r\n\r\n{code}", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-12T23:33:00.000+0000", "updated": "2016-09-12T23:33:00.000+0000" }, { "id": "395963", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "APPROVED. CR and FT passed.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-09-13T00:01:00.000+0000", "updated": "2016-09-13T00:01:00.000+0000" }, { "id": "396003", "author": { "name": "cthomas", "key": "cthomas", "displayName": "Christy Thomas", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Would this be available to test via a nightly build? If so which one?\r\n\r\nI gave 5.5.0.v20160913000746 a try this morning and I'm not getting the handleurl event. \r\n\r\nWill this require more than just using the right SDK?\r\n\r\n", "updateAuthor": { "name": "cthomas", "key": "cthomas", "displayName": "Christy Thomas", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-13T12:07:23.000+0000", "updated": "2016-09-13T12:07:23.000+0000" }, { "id": "396004", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "It's there. Use the following event:\r\n{code:javascript}\r\nTi.App.iOS.addEventListener(\"handleurl\", function(e) {\r\n // If the handled url is provided by the safari-dialog, close it (use-case for OAuth)\r\n if (e.launchOptions.source == \"com.apple.SafariViewService\") {\r\n safari.close();\r\n }\r\n});\r\n{code}\r\nJust checked the build-server as well, just to be sure. Also check that you selected the correct SDK version in your tiapp.xml.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-13T12:13:04.000+0000", "updated": "2016-09-13T12:13:04.000+0000" }, { "id": "396005", "author": { "name": "cthomas", "key": "cthomas", "displayName": "Christy Thomas", "active": true, "timeZone": "America/Los_Angeles" }, "body": "It worked. Thank you. I was missing the iOS part.", "updateAuthor": { "name": "cthomas", "key": "cthomas", "displayName": "Christy Thomas", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-13T12:20:02.000+0000", "updated": "2016-09-13T12:20:02.000+0000" }, { "id": "396167", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed, using:\r\n\r\nMacOS 10.12 (16A313a)\r\nStudio 4.7.1.201609100950\r\nTi SDK 5.5.0.GA\r\nAppc NPM 4.2.7\r\nAppc CLI 5.5.0\r\nAlloy 1.9.2\r\nXcode 8.0 (8A218a)\r\n\r\nhandleurl event is fired and correctly handled. Tested using the provided test code as well as modified versions of it. The event was fired and caught properly.", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-09-14T22:14:33.000+0000", "updated": "2016-09-14T22:14:33.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }