diff --git a/pass/Controllers/SettingsTableViewController.swift b/pass/Controllers/SettingsTableViewController.swift index 1fe9aee..829a2a7 100644 --- a/pass/Controllers/SettingsTableViewController.swift +++ b/pass/Controllers/SettingsTableViewController.swift @@ -10,6 +10,7 @@ import CoreData import passKit import SVProgressHUD import UIKit +import YubiKit class SettingsTableViewController: UITableViewController, UITabBarControllerDelegate { @IBOutlet var pgpKeyTableViewCell: UITableViewCell! @@ -184,12 +185,14 @@ class SettingsTableViewController: UITableViewController, UITabBarControllerDele ) } - optionMenu.addAction( - UIAlertAction(title: Defaults.isYubiKeyEnabled ? "✓ YubiKey" : "YubiKey", style: .default) { _ in - Defaults.isYubiKeyEnabled.toggle() - self.setPGPKeyTableViewCellDetailText() - } - ) + if YubiKitDeviceCapabilities.supportsMFIAccessoryKey { + optionMenu.addAction( + UIAlertAction(title: Defaults.isYubiKeyEnabled ? "✓ YubiKey" : "YubiKey", style: .default) { _ in + Defaults.isYubiKeyEnabled.toggle() + self.setPGPKeyTableViewCellDetailText() + } + ) + } if Defaults.pgpKeySource != nil { optionMenu.addAction(