I'm using Secure Enclave to generate and use a private key like this:
let access = SecAccessControlCreateWithFlags(nil,
kSecAttrAccessibleWhenUnlockedThisDeviceOnly,
[.privateKeyUsage, .biometryAny],
nil)
let attributes: [String: Any] = [
kSecAttrKeyType as String: kSecAttrKeyTypeECSECPrimeRandom,
kSecAttrKeySizeInBits as String: 256,
kSecAttrTokenID as String: kSecAttrTokenIDSecureEnclave,
kSecAttrAccessControl as String: access as Any,
kSecAttrApplicationTag as String: "com.example.key".data(using: .utf8)!,
kSecReturnRef as String: true
]
let privateKey = SecKeyCreateRandomKey(attributes as CFDictionary, nil)
Later, I use this key to sign a message:
let signature = SecKeyCreateSignature(privateKey, .ecdsaSignatureMessageX962SHA256, dataToSign as CFData, nil)
This prompts for biometric authentication, but shows the default system text.
How can I customize or localize the biometric prompt (e.g., title, description, button text) shown during SecKeyCreateSignature?
Thanks!