NVM I found the solution.
let context = LAContext()
context.localizedReason = "Authenticate to sign your transaction" // Main prompt text
context.localizedCancelTitle = "Cancel" // Cancel button text
context.localizedFallbackTitle = "Use Passcode"
// While fetching the private key pass the context
let query: [String: Any] = [
kSecClass as String: kSecClassKey,
kSecAttrApplicationTag as String: "com.example.key".data(using: .utf8)!,
kSecReturnRef as String: true,
kSecUseAuthenticationContext as String: context // Associate the context
]
Topic:
Privacy & Security
SubTopic:
General
Tags: