KeychainAccess
KeychainAccess copied to clipboard
TouchID not showed after .removeAll()
Hi guys, I got this weird issue. Seems that if I call
do {
try Keychain(service: "XXX").removeAll()
} catch let error {
Manager.log.error("Failed to remove all keychains with error: \(error)")
}
and after
let keychain = Keychain(service: "XXX")
DispatchQueue.global(qos: DispatchQoS.QoSClass.default).async {
do {
// Should be the secret invalidated when passcode is removed? If not then use '.WhenUnlocked'
try keychain
.accessibility(.whenPasscodeSetThisDeviceOnly, authenticationPolicy: .userPresence)
.authenticationPrompt("Authenticate to update your access token")
.set("01234567-89ab-cdef-0123-456789abcdef", key: "kishikawakatsumi")
} catch let error {
// Error handling if needed...
}
}
the touch id pop up is not showed but, if you call it again the pop up is showed. Seems that the first time you try to access to touch id after .removeAll() is broken. Any clue why?
[UPDATED]
~~Seems that calling any Keychain feature in application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool
fail the touch id. I was calling the .removeAll()
there but even if I set a key there the touch id fails.~~
The problem is always there if I use .removeAll()
in any place. Also if you set a key in application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool
the touch id fails as well.
Same thing here, couldn't figure out why
@kishikawakatsumi may you help out here?
Hi, I'm having the same issue with the "remove" method also. Next time I'm adding an item, the TouchId popup won't show.
Any updates on this?