{ "id": "174937", "key": "TIMOB-27861", "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": "21018", "name": "Release 9.0.2", "archived": false, "released": true, "releaseDate": "2020-05-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2020-05-06T11:54:24.000+0000", "created": "2020-04-21T23:59:20.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "callback", "ios", "openUrl", "regression" ], "versions": [ { "id": "20412", "name": "Release 8.1.0", "archived": false, "released": true, "releaseDate": "2019-08-13" } ], "issuelinks": [ { "id": "58345", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "174938", "key": "TIMOB-27862", "fields": { "summary": "Android: Add callback support to Ti.Platform.openURL()", "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": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-05-06T11:54:24.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": "*Summary:*\r\nThe {{Ti.Platform.openURL()}} method supports 2 optional arguments, an \"options\" dictionary and a callback. If you omit the \"options\" dictionary argument and only supply a callback argument, then the callback will not be invoked. It ignores the callback argument.\r\nhttps://docs.appcelerator.com/platform/latest/#!/api/Titanium.Platform-method-openURL\r\n\r\nThis regression was introduced as of Titanium 8.1.0.\r\n\r\nThe URL will still be opened (if possible), but you cannot receive the result of the open operation to know if it was successful or not in code.\r\n\r\n*Test:*\r\n# Build and run the below on iOS 10 or higher.\r\n# Tap on the \"Open URL\" button.\r\n# Look in the log. Notice the callback never logged: {{### openURL() callback...}}\r\n# Note that the URL was still opened, but you can't receive any indication it was successful.\r\n\r\n{code:javascript}\r\nvar window = Ti.UI.createWindow();\r\nvar button = Ti.UI.createButton({ title: \"Async Open URL\" });\r\nbutton.addEventListener(\"click\", function() {\r\n\tTi.Platform.openURL(\"https://www.google.com\", function(e) {\r\n\t\tTi.API.info(\"### openURL() callback event.success: \" + e.success);\r\n\t});\r\n});\r\nwindow.add(button);\r\nwindow.open();\r\n{code}\r\n\r\n*Note:*\r\nNotice the last test case in [TIMOB-23888] tests it without the \"options\" argument, suggesting that this once worked.\r\n\r\n*Work-Around:*\r\nAdd the \"options\" dictionary argument as shown below.\r\n{code:javascript}\r\nTi.Platform.openURL(\"https://www.google.com\", {}, function(e) {\r\n\tTi.API.info(\"### openURL() callback event.success: \" + e.success);\r\n});\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "iOS: openURL() callback not invoked if missing options dictionary as of 8.1.0", "creator": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 1194, "state": "closed", "name": "2020 Sprint 9", "startDate": "2020-04-24T17:09:51.572Z", "endDate": "2020-05-08T17:09:00.000Z", "completeDate": "2020-05-08T15:40:07.869Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "455219", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR(9_0_X) - https://github.com/appcelerator/titanium_mobile/pull/11655\r\nPR(master) - https://github.com/appcelerator/titanium_mobile/pull/11654\r\n\r\n@QE Please verify test cases from TIMOB-23888 as well.", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-04-22T22:58:27.000+0000", "updated": "2020-04-22T22:59:21.000+0000" }, { "id": "455363", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed on Master and 9_0_X, waiting on Jenkins build.", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-05-05T13:30:28.000+0000", "updated": "2020-05-05T13:30:28.000+0000" }, { "id": "455370", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "merged to master for 9.1.0 target and 9_0_X for 9.0.2 target", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2020-05-05T18:17:31.000+0000", "updated": "2020-05-05T18:17:31.000+0000" }, { "id": "455377", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "*Closing ticket.* Fix verified in SDK version 9.1.0.v20200505112143 and 9.0.2.v20200505111803\r\n\r\nTest and other information can be found at:\r\nPR(9_0_X) - https://github.com/appcelerator/titanium_mobile/pull/11655\r\nPR(master) - https://github.com/appcelerator/titanium_mobile/pull/11654", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-05-06T11:54:17.000+0000", "updated": "2020-05-06T11:54:17.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }