Fingerprint Recognition for ios development

Source: Internet
Author: User

Fingerprint Recognition for ios development
Fingerprint Recognition is released for iPhone 5s. The most important application area of the fingerprint recognition SDK for iOS 8.0 apple is that the fingerprint recognition function should be used for payment. You need to import the header file.

#import 
  
Core code
If ([UIDevice currentDevice]. systemVersion. floatValue <8.0) {NSLog (@ "not supported"); return;} LAContext * ctx = [[LAContext alloc] init]; // determine whether the device supports fingerprint recognition if ([ctx canEvaluatePolicy: LAPolicyDeviceOwnerAuthenticationWithBiometrics error: NULL]) {NSLog (@ ""); // enter the fingerprint, asynchronous // prompt: fingerprint recognition only determines whether the current user is the mobile phone owner! The original logic of the program will not be disturbed! [Ctx evaluatePolicy: Login localizedReason: @ "fingerprint Logon" reply: ^ (BOOL success, NSError * error) {NSLog (@ "% d % @", success, error ); if (success) {// logon succeeded // TODO}]; NSLog (@ "come here") ;}else {NSLog (@ "not supported ");}

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.