[TIMOB-26818] iOS: Move application shortcut under Ti.UI.Shortcut to have parity
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2020-08-11T10:59:58.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 9.1.0 |
Components | iOS |
Labels | parity, shortcut |
Reporter | Vijay Singh |
Assignee | Joshua Quick |
Created | 2019-02-11T22:50:16.000+0000 |
Updated | 2020-08-11T10:59:58.000+0000 |
Description
iOS has Ti.UI.iOS.ApplicationShortcuts and android has implemented Ti.UI.ShortcutItem for shortcut. To have parity on both platform , it is discussed to move Shortcut APIs under Ti.UI.Shortcut. Following are the decided APIs -
1. var shortcutItem = Ti.UI.createShortcutItem({
id: String // Unique identifier
title: String
description: String
icon: String/Number
data: Dictionary
})
2. var shortcut = Ti.UI.createShortcut();
3. shortcut.add(Ti.UI.ShortcutItem);
4. shortcut.items -> Array<Ti.UI.ShortcutItem>
5. shortcut.getById(id) -> Ti.UI.ShortcutItem
6. shortcut.staticItems -> Array<Ti.UI.ShortcutItem>
7. shortcut.remove(Ti.UI.ShortcutItem);
8. shortcut.removeAll();
9. Event listener - Ti.UI.Shortcuts.addEventListener('click', listener); -> Ti.UI.ShortcutItem
PR - https://github.com/appcelerator/titanium_mobile/pull/11697
merged iOS PR to master for 9.1.0 target
Removed
Ti.UI.createShortcut()
method and madeTi.UI.Shortcut
a module. The same was done on Android via [TIMOB-27889]. PR (master): https://github.com/appcelerator/titanium_mobile/pull/11857FR Passed, waiting on Jenkins build and backport builds.
re-enabled the tests on Gary's PR, merged it in to master and then merge the "backports" to 9_1_X and 9_3_X
*Closing ticket*. Improvement verified in SDK version
9.1.0.v20200810120239
,9.2.0.v20200810085310
and9.3.0.v20200810090511
. *Test and other information can be found at:* https://github.com/appcelerator/titanium_mobile/pull/11856