diff --git a/pass/AppDelegate.swift b/pass/AppDelegate.swift index a65ca6e..4412ada 100644 --- a/pass/AppDelegate.swift +++ b/pass/AppDelegate.swift @@ -35,9 +35,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate { } } UNUserNotificationCenter.current().delegate = NotificationCenterDispatcher.shared - #if !targetEnvironment(simulator) - _ = passKit.YubiKeyConnection.shared - #endif return true } diff --git a/pass/Controllers/PasswordDetailTableViewController.swift b/pass/Controllers/PasswordDetailTableViewController.swift index 09aae15..88dda63 100644 --- a/pass/Controllers/PasswordDetailTableViewController.swift +++ b/pass/Controllers/PasswordDetailTableViewController.swift @@ -101,7 +101,7 @@ class PasswordDetailTableViewController: UITableViewController, UIGestureRecogni } private func decryptThenShowPassword() { - if Defaults.isYubiKeyEnabled { + if Defaults.isYubiKeyEnabled, YubiKitDeviceCapabilities.supportsISO7816NFCTags { decryptThenShowPasswordYubiKey() } else { decryptThenShowPasswordLocalKey() diff --git a/pass/Controllers/SettingsTableViewController.swift b/pass/Controllers/SettingsTableViewController.swift index 829a2a7..4505e20 100644 --- a/pass/Controllers/SettingsTableViewController.swift +++ b/pass/Controllers/SettingsTableViewController.swift @@ -185,7 +185,7 @@ class SettingsTableViewController: UITableViewController, UITabBarControllerDele ) } - if YubiKitDeviceCapabilities.supportsMFIAccessoryKey { + if YubiKitDeviceCapabilities.supportsISO7816NFCTags { optionMenu.addAction( UIAlertAction(title: Defaults.isYubiKeyEnabled ? "✓ YubiKey" : "YubiKey", style: .default) { _ in Defaults.isYubiKeyEnabled.toggle() diff --git a/passKit/Helpers/YubiKeyConnection.swift b/passKit/Helpers/YubiKeyConnection.swift index 1830488..fc8892b 100644 --- a/passKit/Helpers/YubiKeyConnection.swift +++ b/passKit/Helpers/YubiKeyConnection.swift @@ -18,7 +18,7 @@ public class YubiKeyConnection: NSObject { override init() { super.init() - if YubiKitDeviceCapabilities.supportsMFIAccessoryKey { + if YubiKitDeviceCapabilities.supportsISO7816NFCTags { YubiKitManager.shared.delegate = self YubiKitManager.shared.startAccessoryConnection() }