cordova-plugin-3dtouch-shorcutitem
Description
-
This plugin will notify you JavaScript app when you app is launched or resumed using a UIApplicationShortcutItem.
-
The plugin will call
window.onShortcutEvent
and pass an object. Thedata
property of that object contains theUIApplicationShortcutItemType
of the shortcut used.
Installation
$ cordova plugin add cordova-plugin-3dtouch-shortcutitems
Xcode Project Setup
For custom shortcut icon create an Asset cataglog and add your images. In this example the custom image used is called my-shortcut-icon
. Set the text for the shortcut, in this example we are using Shortcut Title
. Finnaly set the type of the shortcut, we are using com.example.quicklink.action
.
Project.plist
UIApplicationShortcutItems UIApplicationShortcutItemIconFile my-shortcut-icon UIApplicationShortcutItemTitle Shortcut Title UIApplicationShortcutItemType com.example.quicklink.action
UIApplicationShortcutItems Reference
JavaScript Interface
// Register callbackwindow { ;}; // Initialize properlydocument;