{ "id": "172081", "key": "TIMOB-26312", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": "20183", "description": "", "name": "Release 7.4.0", "archived": false, "released": true, "releaseDate": "2018-09-17" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-08-28T15:52:18.000+0000", "created": "2018-08-17T08:35:05.000+0000", "epic": { "id": 170940, "key": "TIMOB-25708", "name": "Support iOS 12", "summary": "iOS: Support iOS 12 and Xcode 10", "color": { "key": "color_6" }, "done": false }, "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [], "issuelinks": [ { "id": "56738", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "171747", "key": "TIMOB-26101", "fields": { "summary": "iOS 12: Support Siri Shortcuts via Intents", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "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": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-08-31T13:21:30.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": "In iOS 12, Apple has given some new APIs in {{NSUserActivity}}. These APIs can be used for Siri shortcut supports as well. It will be good to expose these APIs to developers.\r\n", "attachment": [], "flagged": false, "summary": "iOS 12 : Expose new NSUserActivity APIs for Siri Intents", "creator": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 1070, "state": "closed", "name": "2018 Sprint 18 SDK", "startDate": "2018-08-26T16:14:35.297Z", "endDate": "2018-09-09T16:14:00.000Z", "completeDate": "2018-09-11T20:59:21.495Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "441062", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (Master) - https://github.com/appcelerator/titanium_mobile/pull/10288\r\nPR (7_4_X) - https://github.com/appcelerator/titanium_mobile/pull/10292\r\n\r\nTest Case - \r\n\r\n{code:js}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: '#fff'\r\n});\r\n \r\nvar identifierBtn = Ti.UI.createButton({\r\n top: 100,\r\n title: 'Persistent Identifier'\r\n});\r\n\r\nvar btn = Ti.UI.createButton({\r\n top: 200,\r\n title: 'Delete UserActivity for identifier'\r\n});\r\n \r\nvar deleteBtn = Ti.UI.createButton({\r\n top: 300,\r\n title: 'Delete All UserActivity'\r\n});\r\n\r\nvar itemAttr = Ti.App.iOS.createSearchableItemAttributeSet({\r\n itemContentType: Ti.App.iOS.UTTYPE_IMAGE,\r\n title: 'Titanium Siri Shortcut Tutorial',\r\n contentDescription: 'Tech Example \\nOn: ' + (new Date().toLocaleString()),\r\n});\r\n \r\nvar activity = Ti.App.iOS.createUserActivity({\r\n activityType: 'com.appcelerator.titanium',\r\n title: 'Siri shortcut activity',\r\n userInfo: {\r\n msg: 'hello world'\r\n },\r\n eligibleForSearch: true,\r\n eligibleForPrediction: true,\r\n persistentIdentifier: 'titanium_siri_identifier'\r\n});\r\n \r\nactivity.addContentAttributeSet(itemAttr);\r\n \r\nif (!activity.isSupported()) {\r\n alert('User Activities are not supported on this device!');\r\n} else {\r\n activity.becomeCurrent();\r\n \r\n Ti.App.iOS.addEventListener('continueactivity', function(e) {\r\n Ti.API.info('continueactivity called');\r\n if (e.activityType === 'com.appcelerator.titanium' && e.userInfo.msg) {\r\n alert(e.userInfo.msg);\r\n }\r\n });\r\n}\r\n \r\nactivity.addEventListener('useractivitydeleted', function(e) {\r\n Ti.API.info('useractivitydeleted called');\r\n alert('user activity deleted');\r\n});\r\n \r\nbtn.addEventListener('click', function() {\r\n activity.deleteSavedUserActivitiesForPersistentIdentifiers(['titanium_siri_identifier']);\r\n});\r\n \r\nidentifierBtn.addEventListener('click', function() {\r\n Ti.API.info('persistent identfier is: ' +activity.persistentIdentifier);\r\n Ti.API.info('\\neligibleForPrediction is: ' +activity.eligibleForPrediction);\r\n});\r\n\r\ndeleteBtn.addEventListener('click', function() {\r\n activity.deleteAllSavedUserActivities();\r\n});\r\n\r\nwin.add(identifierBtn);\r\nwin.add(btn);\r\nwin.add(deleteBtn);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-08-26T08:15:47.000+0000", "updated": "2018-08-28T09:59:16.000+0000" }, { "id": "441256", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "*Closing ticket.* Verified fix in SDK version: {{7.4.0.v20180829013317}} and SDK Version: {{7.5.0.v20180829030547}} Able to use Siri shortcuts to trigger a User Activity in a application. \r\n\r\n*FR Passed (Test Steps):*\r\n# Created a new Titanium application\r\n# Added the code above in to the application \r\n# Installed app on to the device\r\n# On the device I went to the following location {{Settings/Siri & Search/}}\r\n# Found the application I just created \r\n# Pressed the {{+}} button to create a User Activity (Application is set up for a hello world test)\r\n# Recorded a phrase for the available activity ('One' was used)\r\n# Launched Siri and said {{One}} \r\n# Siri was able to launch the user Activity in the application ('Hello world' popup was seen)\r\n\r\n*Environment*\r\n{code:java}\r\nAPPC Studio: 5.1.0.201808080937\r\nAPPC CLI: 7.0.6\r\niphone 6 (12.0)\r\nOperating System Name: Mac OS High Sierra\r\nOperating System Version: 10.13.6\r\nNode.js Version: 8.9.1\r\nXcode 10.0 beta 6\r\n{code}\r\n", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-08-31T13:21:09.000+0000", "updated": "2018-08-31T13:21:09.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }