Wondering how I can determine if the device the user has supports the Touch ID API? Hopefully have this as a boolean value.
Thanks!
Wondering how I can determine if the device the user has supports the Touch ID API? Hopefully have this as a boolean value.
Thanks!
This function will help with that -
You should consider
LAContext
framework that is required to Touch ID authentication.And parameter
LAErrorTouchIDNotAvailable
will show is devise support this functionality.Code snippet :
Nice tutorial to learn this feature is here.
You can check the error using
CanEvaluatePolicy
. If the Error Code is -6, it means no physical Touch Id on that device. You can tell from the Error Description, it saysBelow is the code if you're using C# Xamarin:
Objective c
try this:
or like @rckoenes suggest:
UPDATE
I forgot, check this: How can we programmatically detect which iOS version is device running on? to define
SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO