{ "id": "159123", "key": "TIMOB-23297", "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": "16980", "description": "New V8", "name": "Release 6.0.0", "archived": false, "released": true, "releaseDate": "2016-11-15" }, { "id": "17706", "name": "Release 5.4.0", "archived": false, "released": true, "releaseDate": "2016-08-11" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-07-04T04:07:43.000+0000", "created": "2016-03-29T23:44:48.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "ios", "shortcuts" ], "versions": [], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2016-07-28T21:48:54.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": "I am testing out the new support for Application Shortcuts as described here:\r\nhttp://www.appcelerator.com/blog/2015/11/ios-9-3d-touch-sample-app/\r\n\r\nI have the shortcuts showing when I press on the app icon - perfect.\r\n\r\nHowever as soon as the app launches it crashes. And the reason is that when the app is launched or resumed I perform some checks for incoming parameters using the Ti.App.getArguments().\r\n\r\nAnd it seems that whenever the app is *launched* using a App Shortcut, then any subsequent call to Ti.App.getArguments() crashes the app.\r\n\r\nThe crash error message is:\r\n\r\n{noformat}\r\n[UIApplicationShortcutItem boundBridge:withKrollObject:]: unrecognized selector sent to instance 0x137d65370\r\n{noformat}\r\n\r\nI will attach a sample project which has a App Shortcut set in the tiapp.xml file as follows:\r\n\r\n{code:xml}\r\nUIApplicationShortcutItems\r\n\r\n \r\n UIApplicationShortcutItemIconType\r\n UIApplicationShortcutIconTypeSearch\r\n UIApplicationShortcutItemTitle\r\n Search\r\n UIApplicationShortcutItemType\r\n search\r\n UIApplicationShortcutItemUserInfo\r\n \r\n \r\n\r\n{code}\r\n\r\nAnd a very simple app.js using native code:\r\n\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: 'blue'\r\n});\r\nwin.open();\r\n\r\nTi.App.getArguments();\r\n{code}\r\n\r\nMake sure the app is force closed. Then launch the app via the App Shortcut (not the app icon). It will crash with the above error.\r\n\r\nTested on my iPhone 6S Plus.", "attachment": [ { "id": "58762", "filename": "IMG_2008.jpg", "author": { "name": "mdelmarter", "key": "mdelmarter", "displayName": "Matthew Delmarter", "active": true, "timeZone": "Pacific/Auckland" }, "created": "2016-03-29T23:49:44.000+0000", "size": 347438, "mimeType": "image/jpeg" }, { "id": "58761", "filename": "IMG_2009.jpg", "author": { "name": "mdelmarter", "key": "mdelmarter", "displayName": "Matthew Delmarter", "active": true, "timeZone": "Pacific/Auckland" }, "created": "2016-03-29T23:49:52.000+0000", "size": 663529, "mimeType": "image/jpeg" }, { "id": "58760", "filename": "Test3dTouch.zip", "author": { "name": "mdelmarter", "key": "mdelmarter", "displayName": "Matthew Delmarter", "active": true, "timeZone": "Pacific/Auckland" }, "created": "2016-03-29T23:43:55.000+0000", "size": 65562, "mimeType": "application/zip" } ], "flagged": false, "summary": "Calling Ti.App.getArguments() crashes app when launched via new App Shortcuts", "creator": { "name": "mdelmarter", "key": "mdelmarter", "displayName": "Matthew Delmarter", "active": true, "timeZone": "Pacific/Auckland" }, "subtasks": [], "reporter": { "name": "mdelmarter", "key": "mdelmarter", "displayName": "Matthew Delmarter", "active": true, "timeZone": "Pacific/Auckland" }, "environment": null, "closedSprints": [ { "id": 649, "state": "closed", "name": "2016 Sprint 13 SDK", "startDate": "2016-06-18T00:25:17.303Z", "endDate": "2016-07-02T00:25:00.000Z", "completeDate": "2016-07-04T04:25:16.889Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "380987", "author": { "name": "mdelmarter", "key": "mdelmarter", "displayName": "Matthew Delmarter", "active": true, "timeZone": "Pacific/Auckland" }, "updateAuthor": { "name": "mdelmarter", "key": "mdelmarter", "displayName": "Matthew Delmarter", "active": true, "timeZone": "Pacific/Auckland" }, "created": "2016-03-29T23:47:13.000+0000", "updated": "2016-03-29T23:47:13.000+0000" }, { "id": "380988", "author": { "name": "mdelmarter", "key": "mdelmarter", "displayName": "Matthew Delmarter", "active": true, "timeZone": "Pacific/Auckland" }, "body": "Screenshots of the app running on my iPhone 6S Plus", "updateAuthor": { "name": "mdelmarter", "key": "mdelmarter", "displayName": "Matthew Delmarter", "active": true, "timeZone": "Pacific/Auckland" }, "created": "2016-03-29T23:50:08.000+0000", "updated": "2016-03-29T23:50:08.000+0000" }, { "id": "381062", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, \r\n\r\nAccording to the closed ticket link that you provided, It looks like the issue is fixed in SDK 5.4.0. I would suggest building your app with SDK 5.4.0 and see if the error still exists. Please be informed that currently SDK 5.4.0 is a beta release and possibly lead to other issues. You can download the SDK from here http://builds.appcelerator.com.s3.amazonaws.com/index.html#master\r\n\r\nPlease, Build the app in SDK 5.4.0 and see if the issue is fixed or not. Feel free to reply on any other issues too.\r\n\r\nRegards,\r\nSharif\r\n", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-03-30T17:55:42.000+0000", "updated": "2016-03-30T17:55:42.000+0000" }, { "id": "381083", "author": { "name": "mdelmarter", "key": "mdelmarter", "displayName": "Matthew Delmarter", "active": true, "timeZone": "Pacific/Auckland" }, "body": "@Sharif thanks for the suggestion to try SDK 5.4.0. I downloaded the latest build of this SDK and built/ran the app on my iPhone 6S Plus to see if it fixed the issue. Unfortunately it had exactly the same issue. It did not fix the problem.", "updateAuthor": { "name": "mdelmarter", "key": "mdelmarter", "displayName": "Matthew Delmarter", "active": true, "timeZone": "Pacific/Auckland" }, "created": "2016-03-30T19:42:58.000+0000", "updated": "2016-03-30T19:42:58.000+0000" }, { "id": "382406", "author": { "name": "mdelmarter", "key": "mdelmarter", "displayName": "Matthew Delmarter", "active": true, "timeZone": "Pacific/Auckland" }, "body": "Really hoping to see this assigned and resolved? The new app shortcuts are useless to me until this is fixed...", "updateAuthor": { "name": "mdelmarter", "key": "mdelmarter", "displayName": "Matthew Delmarter", "active": true, "timeZone": "Pacific/Auckland" }, "created": "2016-04-12T04:15:21.000+0000", "updated": "2016-04-12T04:15:21.000+0000" }, { "id": "384411", "author": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-05-01T06:42:35.000+0000", "updated": "2016-05-01T06:42:35.000+0000" }, { "id": "384573", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hey everyone. First of all, thanks for all the information, appreciate that! So its looking like TIMOB-23232 is a duplicate of TIMOB-20183 and this ticket is fixed by that one. So please try out the [latest master|http://builds.appcelerator.com/#master] to check if that solved your issue. If not, we probably need to apply the same fix for the application shortcuts launch options. Thanks!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-05-03T12:18:09.000+0000", "updated": "2016-05-03T12:18:09.000+0000" }, { "id": "384587", "author": { "name": "mdelmarter", "key": "mdelmarter", "displayName": "Matthew Delmarter", "active": true, "timeZone": "Pacific/Auckland" }, "body": "I am a little confused by all this back and forth. Yes TIMOB-20183 was resolved by SDK 5.4.0.\r\n\r\nThe PR that resolved 20183 is here:\r\nhttps://github.com/appcelerator/titanium_mobile/pull/7614\r\n\r\n@Sharif already suggested right at the outset that I try 5.4.0 to see if it fixes the problem. I already tried it on 31 March and clearly stated \"It did not fix the problem\".\r\n\r\nI also directly applied the same code fix from the PR and it did +not+ fix the problem.\r\n\r\nSo we are already past this suggestion... unless you mean that the same fix needs to be applied to _other areas_ of the SDK code? i.e. not the same chunk of code inside iphone/Classes/TiApp.m?", "updateAuthor": { "name": "mdelmarter", "key": "mdelmarter", "displayName": "Matthew Delmarter", "active": true, "timeZone": "Pacific/Auckland" }, "created": "2016-05-03T14:07:14.000+0000", "updated": "2016-05-03T21:21:46.000+0000" }, { "id": "389842", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/8105\r\n\r\nSteps to test:\r\n0. Make sure you have a device that has at least iOS 9 and supports Force-Touch (iPhone 6S, iPhone 6S Plus)\r\n1. Include the following in the {{}} section of your tiapp.xml:\r\n{code:xml}\r\nUIApplicationShortcutItems\r\n\r\n \r\n UIApplicationShortcutItemIconType\r\n UIApplicationShortcutIconTypeSearch\r\n UIApplicationShortcutItemTitle\r\n Search\r\n UIApplicationShortcutItemType\r\n search\r\n UIApplicationShortcutItemUserInfo\r\n \r\n \r\n\r\n{code}\r\n2. Copy the following in your app.js\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: 'blue'\r\n});\r\nwin.open();\r\n \r\nTi.App.getArguments();\r\n\r\nTi.App.iOS.addEventListener(\"shortcutitemclick\", function(e){\r\n Ti.API.info(\"shortcutitemclick Event Fired\");\r\n alert(e);\r\n});\r\n{code}\r\n3. Launch the app and put it in background by tapping the home button\r\n4. Launch the app using the shortcut in the home-screen - No crash should appear and the {{shortcutitemclick}} event should be triggered.\r\n5. Close the app completely by closing it from multitasking\r\n6. Open the app using the shortcut again - No crash should appear and the {{shortcutitemclick}} event should be triggered.\r\n7. Thank you!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-07-03T01:31:23.000+0000", "updated": "2016-07-03T01:31:23.000+0000" }, { "id": "389855", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~hansknoechel] PR Merged. Please do a 5.4.0 back port.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-07-04T03:52:56.000+0000", "updated": "2016-07-04T03:52:56.000+0000" }, { "id": "389856", "author": { "name": "mdelmarter", "key": "mdelmarter", "displayName": "Matthew Delmarter", "active": true, "timeZone": "Pacific/Auckland" }, "body": "I haven't had a chance to test this yet, but I have been waiting patiently for resolution and wanted to say thanks for the fix. Much appreciated.", "updateAuthor": { "name": "mdelmarter", "key": "mdelmarter", "displayName": "Matthew Delmarter", "active": true, "timeZone": "Pacific/Auckland" }, "created": "2016-07-04T03:55:29.000+0000", "updated": "2016-07-04T03:55:29.000+0000" }, { "id": "389857", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR (5_4_X): https://github.com/appcelerator/titanium_mobile/pull/8107\r\n\r\n[~mdelmarter] I am happy to hear that! Feel free to verify the fix using the [latest master build|builds.appcelerator.com/#master] that should be available in a few minutes.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-07-04T04:02:36.000+0000", "updated": "2016-07-04T04:02:36.000+0000" }, { "id": "389858", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Backport PR merged.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-07-04T04:05:43.000+0000", "updated": "2016-07-04T04:05:43.000+0000" }, { "id": "389954", "author": { "name": "mdelmarter", "key": "mdelmarter", "displayName": "Matthew Delmarter", "active": true, "timeZone": "Pacific/Auckland" }, "body": "Backported changes to 5.2.1 - confirmed as working perfectly.", "updateAuthor": { "name": "mdelmarter", "key": "mdelmarter", "displayName": "Matthew Delmarter", "active": true, "timeZone": "Pacific/Auckland" }, "created": "2016-07-06T00:56:50.000+0000", "updated": "2016-07-06T00:56:50.000+0000" }, { "id": "391897", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed. Verified, while using Hans's test code, that the app does not crash when calling {{Ti.App.getArguments}} via App Shortcuts.\r\n\r\nTested on:\r\n\r\nAppc CLI NPM: 4.2.7\r\nAppc CLI Core: 5.4.0-36\r\nArrow: 1.8.2\r\nSDK: 5.4.0.v20160727143921\r\nNode: v4.4.7\r\nOS: Mac OS X (10.11.6)\r\nXcode: 7.3.1\r\nDevice: iphone 6s plus (9.3.1)", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-07-28T21:48:49.000+0000", "updated": "2016-07-28T21:48:49.000+0000" } ], "maxResults": 19, "total": 19, "startAt": 0 } } }