Handle Touch ID errors when retrieve data from keychain - Swift
pcsantana opened this issue · 2 comments
pcsantana commented
Hi!
I have a doubt. Is there a way to handle the errors if touch ID not matching? For example, if user tap on cancel button (in touch ID dialog).
Thanks!
pcsantana commented
In addition, I tried to handle the error getting NSData with the method dataForKey(key:promptMessage:error)
But I get a strange error when I pass error parameter (using swift):
let keychain = A0SimpleKeychain()
var keychainError: NSError?
// I get an error in error parameter: '&' used with non-inout argument of type '()'
let passwordData = keychain.dataForKey("some_key", promptMessage: "Some message", error: &keychainError)
Here the xcode suggested to delete '&'. But if I do it, the error appears: "Call can throw, but it is not marked with 'try' and the error is not handled"
Any suggestion?
Thank you!
jvmk commented
Did you figure this out?