On Xcode 15.4, LAContext.biometryType had an @available attribute of visionOS 1.0. However, in Xcode 16, the @available attribute for biometryType was changed to a visionOS 2.0 minimum requirement, preventing the app from building if the minimum deployment target is earlier than visionOS 2.0.
This was the attribute on Xcode 15.4:
This is the attribute on Xcode 16:
Feedback ID: FB13824190
Local Authentication
RSS for tagAuthenticate users biometrically or with a passphrase using Local Authentication.
Posts under Local Authentication tag
24 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
I have used functionality of changing user's password programmatically using the OpenDirectory framework. Once the password is updated successfully, can be use this password for Login sessions and authentication wherever required. But the same password is failing authenticate with Local Authentication Framework that is with LAContext and prefers always older password. Even restarting machine won't work.
Changing current user's password using below method -
do {
let node = try ODNode(session: ODSession.default(), type: ODNodeType(kODNodeTypeLocalNodes))
let user = try node.record(withRecordType: kODRecordTypeUsers, name: NSUserName(), attributes: nil)
try user.changePassword(currentPassword, toPassword: newPassword)
print("Password changed successfully")
} catch var error {
print(error)
}
Once password is updated, then trying to authenticate password with LAContext using,
let context = LAContext()
context.evaluatePolicy(.deviceOwnerAuthentication, localizedReason: "AuthenticationMessage".localized()) { success, error in
DispatchQueue.main.async {
completion(success, error)
}
print("authentication error = (String(describing: error?.localizedDescription))")
}
It won't accept the updated password. Any idea how to solve this problem?
Hi,
Is this possible? I would like to:
Store a biometrically secured key in the Secure Enclave.
Do multiple cryptographic operations using that key in a short period of time (say 5 seconds), not all at once.
Only do one FaceID for that set.
For the time I've only gotten either multiple flashing FaceId requests or the operations failing.
Is it possible to set a time limit in which the first FaceID authentication is accepted?
Should I do something else?
Thanks!
Hi, I am creating simple app with ios 17. I want to authenticate via ios passcode. but I couldn't find any example about it. Where can I get some example about using ios passcode in ios 17? please help me.