IPhone 5s launches fingerprint recognition, the most important application area for Apple to open up the fingerprint Recognition SDK in IOS 8.0 is to pay to use the fingerprint recognition feature and need to import a header file
#import <LocalAuthentication/LocalAuthentication.h>
Core code
if([Uidevice Currentdevice]. Systemversion. Floatvalue<8.0) {NSLog(@"Not supported");return; } lacontext *ctx = [[Lacontext alloc] init];//Determine if the device supports fingerprint identification if([CTX Canevaluatepolicy:lapolicydeviceownerauthenticationwithbiometrics Error:NULL]) {NSLog(@"Support");//input fingerprint, asynchronous //Hint: Fingerprint identification is only to determine whether the current user is the owner of the phone! The original logic of the program is not subject to any interference! [CTX Evaluatepolicy:lapolicydeviceownerauthenticationwithbiometrics localizedreason:@"Fingerprint Login"reply:^ (BOOLSuccessNserror*error) {NSLog(@"%d%@", success, error);if(success) {//Login Successful //TODO} }];NSLog(@"Come Here"); }Else{NSLog(@"Not supported"); }
Fingerprint Identification of iOS development