Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19710] Use same keys in Ti.UI.iOS.ApplicationShortcuts.listStaticShortcuts() as in listDynamicShortcuts()

GitHub Issuen/a
TypeImprovement
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2015-10-13T20:58:52.000+0000
Affected Version/sRelease 5.1.0
Fix Version/sRelease 5.1.0
ComponentsiOS
Labelsn/a
ReporterFokke Zandbergen
AssigneeHans Knöchel
Created2015-10-11T17:50:29.000+0000
Updated2015-10-20T23:22:06.000+0000

Description

Would it make sense to use the same keys in Ti.UI.iOS.ApplicationShortcuts.listStaticShortcuts() as in listDynamicShortcuts()?
[INFO]  Ti.UI.iOS.ApplicationShortcuts.listStaticShortcuts [
[INFO]    {
[INFO]      "UIApplicationShortcutItemIconType": "UIApplicationShortcutIconTypeAdd",
[INFO]      "UIApplicationShortcutItemType": "NewPhoto",
[INFO]      "UIApplicationShortcutItemTitle": "Take photo",
[INFO]      "UIApplicationShortcutItemUserInfo": {
[INFO]        "myCustomKey": "myCustomValue"
[INFO]      },
[INFO]      "UIApplicationShortcutItemSubtitle": "Take a brand new photo"
[INFO]    }
[INFO]  ]
[INFO]  Ti.UI.iOS.ApplicationShortcuts.listDynamicShortcuts [
[INFO]    {
[INFO]      "title": "Open last picture",
[INFO]      "type": "details",
[INFO]      "subtitle": "2015-10-11T17:15:07+02:00",
[INFO]      "userInfo": {
[INFO]        "filename": "D48297EA-8F88-447F-8CDC-48980BEA4EFD.jpg"
[INFO]      }
[INFO]    }
[INFO]  ]

Comments

  1. Fokke Zandbergen 2015-10-13

    Tested this using https://github.com/appcelerator-developer-relations/appc-sample-3dtouch and both have the same keys now, but also both are missing the icon key.
       [INFO]  Ti.UI.iOS.ApplicationShortcuts.listDynamicShortcuts [
       [INFO]    {
       [INFO]      "title": "Open last picture",
       [INFO]      "itemtype": "details",
       [INFO]      "subtitle": "2015-10-11T20:10:42+02:00",
       [INFO]      "userInfo": {
       [INFO]        "filename": "35E96E30-D820-4C91-900D-DF4E7D4AFED3.jpg"
       [INFO]      }
       [INFO]    }
       [INFO]  ]
       [INFO]  Ti.UI.iOS.ApplicationShortcuts.listStaticShortcuts [
       [INFO]    {
       [INFO]      "title": "Take photo",
       [INFO]      "itemtype": "NewPhoto",
       [INFO]      "subtitle": "Take a brand new photo",
       [INFO]      "userInfo": {
       [INFO]        "myCustomKey": "myCustomValue"
       [INFO]      }
       [INFO]    }
       [INFO]  ]
       
  2. Hans Knöchel 2015-10-13

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/7290 PR (5_1_X): https://github.com/appcelerator/titanium_mobile/pull/7298
  3. Harry Bryant 2015-10-20

    Verified as fixed, StaticShortcuts & DynamicShortcuts both follow the same format: Static Shortcut:
       [INFO] :   event payload:{"title":"New Message","itemtype":"com.mycompany.myapp.newmessage","subtitle":"","userInfo":{"key2":"value2"},"bubbles":true,"type":"shortcutitemclick","source":{},"cancelBubble":false}
       
    Dynamic Shortcut:
       [INFO] :   event payload:{"title":"Contact Us","itemtype":"contact_us","subtitle":"Tap to reach us","userInfo":{"infoKey":"contact_us"},"bubbles":true,"type":"shortcutitemclick","source":{},"cancelBubble":false}
       
    Tested on iOS 9 Device. Mac OSX El Capitan 10.11 (15A284) Studio: 4.3.3.201510201834 Ti SDK: 5.2.0.v20151020100425 Appc NPM: 4.2.1-5 Appc CLI: 5.2.0-18 Ti CLI: 5.0.4 Xcode 7.0(7A218) Node v4.2.1 production *Closing ticket.*

JSON Source