{ "id": "153780", "key": "TIMOB-20132", "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": [], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2015-12-11T13:45:23.000+0000", "created": "2015-12-11T13:31:17.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "17532", "name": "Release 5.1.1", "archived": false, "released": true, "releaseDate": "2015-11-24" } ], "issuelinks": [ { "id": "50100", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "153475", "key": "TIMOB-20073", "fields": { "summary": "iOS: Dynamic Shortcut crashes app when it has no userInfo", "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": "None", "id": "6" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-22T20:49:17.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": [], "description": "Create dynamic application shortcuts in iOS, and if you don't specify userinfo, they are created but will crash if you try to access them using the event listener.\r\n\r\nIn the example below, the entries that have user info will console.log correctly the contents of e however the one without user info will crash the app.\r\n\r\n{code}\r\nif (OS_IOS && Ti.UI.iOS.forceTouchSupported) {\r\n var appShortcuts = Ti.UI.iOS.createApplicationShortcuts();\r\n\r\n appShortcuts.addDynamicShortcut({\r\n itemtype: \"post_text\",\r\n title: \"Text\",\r\n subtitle: \"Tap to post text\",\r\n icon: Ti.UI.iOS.SHORTCUT_ICON_TYPE_COMPOSE\r\n });\r\n\r\n appShortcuts.addDynamicShortcut({\r\n itemtype: \"post_photo\",\r\n title: \"Photo\",\r\n subtitle: \"Tap to post a photo\",\r\n icon: Ti.UI.iOS.SHORTCUT_ICON_TYPE_CAPTURE_PHOTO\r\n });\r\n\r\n appShortcuts.addDynamicShortcut({\r\n itemtype: \"post_video\",\r\n title: \"Video\",\r\n subtitle: \"Tap to post a video\",\r\n icon: Ti.UI.iOS.SHORTCUT_ICON_TYPE_CAPTURE_VIDEO,\r\n userInfo: {\r\n action: \"video\"\r\n }\r\n });\r\n\r\n Ti.App.iOS.addEventListener('shortcutitemclick', function(e) {\r\n console.log(e.itemtype); \r\n });\r\n}\r\n{code}", "attachment": [], "flagged": false, "summary": "Crash when creating iOS Application shortcuts without userInfo", "creator": { "name": "jasonkneen", "key": "jasonkneen", "displayName": "Jason Kneen", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "jasonkneen", "key": "jasonkneen", "displayName": "Jason Kneen", "active": true, "timeZone": "Europe/London" }, "environment": null, "comment": { "comments": [ { "id": "372689", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Duplicates TIMOB-20073 and already fixed as part of TIDOC-2348", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-12-11T13:45:16.000+0000", "updated": "2015-12-11T13:45:16.000+0000" }, { "id": "414921", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as duplicate of the ticket that is mentioned above and has since been closed.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-22T20:49:17.000+0000", "updated": "2017-03-22T20:49:17.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }