From 704c49a4d4d3fdd28719b91882811858b02860b0 Mon Sep 17 00:00:00 2001 From: Brandon Hines Date: Mon, 10 Feb 2020 17:32:33 -0600 Subject: [PATCH] prevented ios UI from displaying when checking key existence --- ios/ReactNativeBiometrics.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ios/ReactNativeBiometrics.m b/ios/ReactNativeBiometrics.m index c946b73..d04c297 100644 --- a/ios/ReactNativeBiometrics.m +++ b/ios/ReactNativeBiometrics.m @@ -162,11 +162,12 @@ - (BOOL) biometricKeyExists { NSDictionary *searchQuery = @{ (id)kSecClass: (id)kSecClassKey, (id)kSecAttrApplicationTag: biometricKeyTag, - (id)kSecAttrKeyType: (id)kSecAttrKeyTypeRSA + (id)kSecAttrKeyType: (id)kSecAttrKeyTypeRSA, + (id)kSecUseAuthenticationUI: (id)kSecUseAuthenticationUIFail }; OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)searchQuery, nil); - return status == errSecSuccess; + return status == errSecSuccess || status == errSecInteractionNotAllowed; } -(OSStatus) deleteBiometricKey {