     @available(iOS 9.0, *)
     init(shortcutItem: UIApplicationShortcutItem) {
         if let range = shortcutItem.type.rangeOfCharacterFromSet(NSCharacterSet(charactersInString: "."), options: .BackwardsSearch) {
-            id = shortcutItem.type.substringFromIndex(range.endIndex)
+            type = shortcutItem.type.substringFromIndex(range.endIndex)
         }
         else {
-            id = "unknown"
+            type = "unknown"
         }
         title = shortcutItem.localizedTitle
         subtitle = shortcutItem.localizedSubtitle

    func handle(viewController: UIViewController?, shortcut: Shortcut) -> Bool {
        guard let viewController = viewController as? QuickActionSupport else { return false }
        if #available(iOS 9.0, *) {
            viewController.prepareForQuickAction(shortcut)
            return true
        }
        else {

protocol QuickActionSupport {

    @available(iOS 9.0, *)
    func prepareForQuickAction<T: ShortcutType>(shortcutType: T)

}

class QuickActions<T: ShortcutType> {

    let bundleIdentifier: String

