// app-specific action identifier & payload var type: String { get } var userInfo: [String : NSSecureCoding]? { get } // title, maybe subtitle & icon var localizedTitle: String { get } var localizedSubtitle: String? { get } var icon: UIApplicationShortcutIcon? { get } }
methods: func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { // If a shortcut was launched, display its information and take the appropriate action if let shortcutItem = launchOptions?[UIApplicationLaunchOptionsShortcutItemKey] as? UIApplicationShortcutItem where shortcutItem.type == "myType" { // do something associated with "myType" shortcut and its userInfo data payload } // ... return true } On activation or if launch methods returned true, via the new method, performActionForShortcut:
icon, maybe subtitle • Configured statically in Info.plist, or dynamically at runtime • Passed to the app delegate launch methods, and/ or a dedicated protocol method
(system-provided, static template, or contact photo) • When to update dynamic items (Accounting for all states produced by app lifecycle, app update, etc..) • Confusing API for app delegate launch methods
force detection requires capacitive touch detection • To measure force (e.g., to weigh an object) we need a weightless finger to activate touch, a touch pedestal • Many things don't work