IOS SDK details-App use Touch ID Authentication
Since iOS 8.0, Apple has enabled the App to use Touch ID for authentication. Note the following points:
The App only proxies the authentication process to the iOS system and cannot obtain the fingerprint details. Do not try to compare the fingerprint information with other databases. It is still impossible on the day I wrote it. Used
Start verification
Verification Failed
IPhone 5S + iPad Air 2 + iPad Mini 3 +
How to Use
Framework used for Import
#import
Initialize a LAContext
LAContext * context = [[LAContext alloc] init];
Check whether the current device supports TouchID
NSError * error = nil; if ([context canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&error]) { ...}
If yes, perform Touch ID authentication.
[Context evaluatePolicy: LAPolicyDeviceOwnerAuthenticationWithBiometrics localizedReason: @ To login in reply: ^ (BOOL success, NSError * error) {if (success) {// success} else {// failure}];
There are several Error types returned for failure.
LAErrorAuthenticationFailed-Fingerprint Authentication failed LAErrorUserCancel-user cancellation (for example, click cancel) LAErrorUserFallback-user cancellation (click Enter password) LAErrorSystemCancel-the system cancels LAErrorPasscodeNotSet-the system does not set the password LAErrorTouchIDNotAvailable-the device does not support TouchID LAErrorTouchIDNotEnrolled-Touch ID not set (one fingerprint does not exist)