All Projects → greezi → Tdtouchid

greezi / Tdtouchid

Licence: apache-2.0
TDTouchID是一个封装好的指纹、FaceID验证库,可以用来做iOSAPP的登录/支付等验证。

Projects that are alternatives of or similar to Tdtouchid

React Native Fingerprint Scanner
Provide Fingerprint, Touch ID, and Face ID Scanner for React Native (Compatible with both Android and iOS)
Stars: ✭ 704 (+268.59%)
Mutual labels:  face, touchid, touch
Creepyface
A JavaScript library that makes your face follow the pointer. 🤪🖱️👆
Stars: ✭ 412 (+115.71%)
Mutual labels:  face, touch
Sdk3rd
第三方SDK集成库,授权/分享/支付
Stars: ✭ 249 (+30.37%)
Mutual labels:  payment, login
Biometricauthentication
Use Apple FaceID or TouchID authentication in your app using BiometricAuthentication.
Stars: ✭ 746 (+290.58%)
Mutual labels:  face, touchid
Gopassbridge
A web extension for firefox and chrome to insert login credentials from gopass
Stars: ✭ 182 (-4.71%)
Mutual labels:  login
Face And Image Super Resolution
Stars: ✭ 174 (-8.9%)
Mutual labels:  face
Sam
Steam Account Manager / Switcher
Stars: ✭ 172 (-9.95%)
Mutual labels:  login
Pull Element
Lightweight, high-performance and smooth pull element effect that support all directions
Stars: ✭ 171 (-10.47%)
Mutual labels:  touch
3klcon
Automation Recon tool which works with Large & Medium scopes. It performs more than 20 tasks and gets back all the results in separated files.
Stars: ✭ 189 (-1.05%)
Mutual labels:  face
Waveletsrnet
A pytorch implementation of Paper "Wavelet-srnet: A wavelet-based cnn for multi-scale face super resolution"
Stars: ✭ 186 (-2.62%)
Mutual labels:  face
Loginpass
Login with Google, GitHub, Twitter, Facebook and many other networks.
Stars: ✭ 177 (-7.33%)
Mutual labels:  login
Cognitive Face Windows
Windows SDK for the Microsoft Face API, part of Cognitive Services
Stars: ✭ 175 (-8.38%)
Mutual labels:  face
Zold
An Experimental Non-Blockchain Cryptocurrency for Fast Micro Payments
Stars: ✭ 183 (-4.19%)
Mutual labels:  payment
Slider
Touch swipe image slider/slideshow/gallery/carousel/banner mobile responsive bootstrap
Stars: ✭ 2,046 (+971.2%)
Mutual labels:  touch
Easybutton
Arduino library for debouncing momentary contact switches, detect press, release, long press and sequences with event definitions and callbacks.
Stars: ✭ 187 (-2.09%)
Mutual labels:  touch
Dockerface
Face detection using deep learning.
Stars: ✭ 173 (-9.42%)
Mutual labels:  face
React Credit Cards
Beautiful credit cards for your payment forms
Stars: ✭ 2,239 (+1072.25%)
Mutual labels:  payment
Fbrecog
An unofficial python wrapper for the Facebook face recognition endpoint
Stars: ✭ 184 (-3.66%)
Mutual labels:  face
Yrpayment
Better payment user experience library with cool animation in Swift
Stars: ✭ 176 (-7.85%)
Mutual labels:  payment
React Interactive Paycard
Interactive React Paycard
Stars: ✭ 2,129 (+1014.66%)
Mutual labels:  payment

TDTouchID

TDTouchID是一个封装好的指纹验证、人脸验证库,可以用来做iOSAPP的登录/支付等验证。

#预览 (preview)

(preview-Gif)

#安装方式 使用Cocoa Pods安装

pod 'TDTouchID', '~> 1.0.4'

手动导入

下载本项目,导入子层TDTouchID文件夹.(里面包含TDTouchID.hTDTouchID.m)文件

  • 导入#import "TDTouchID.h"即可使用

哎,真香

#如何使用

/**
 启动生物验证

 @param desc Touch显示的描述
 @param block 回调状态的block
 */
- (void)td_showTouchIDWithDescribe:(NSString *)desc BlockState:(StateBlock)block;

/**
 启动生物验证
 @param desc Touch显示的描述
 @param faceDesc FaceID状态下显示的描述
 @param block 回调状态的block
 */
- (void)td_showTouchIDWithDescribe:(NSString *)desc FaceIDDescribe:(NSString *)faceDesc BlockState:(StateBlock)block;

// 判断设备支持哪种认证方式 TouchID & FaceID
- (TDTouchIDSupperType)td_canSupperBiometrics;

    //判断是否支持生物验证(此处根据不同类型来显示不同的图标)
    TDTouchIDSupperType type = [[TDTouchID sharedInstance] td_canSupperBiometrics];
    switch (type) {
        case TDTouchIDSupperTypeFaceID:
            NSLog(@"😄支持FaceID");
            break;
        case TDTouchIDSupperTypeTouchID:
            NSLog(@"😄支持TouchID");
            break;
        case TDTouchIDSupperTypeNone:
            NSLog(@"😭不支持生物验证");
            break;
        default:
            break;
    }
[[TDTouchID sharedInstance] td_showTouchIDWithDescribe:@"通过Home键验证已有指纹" FaceIDDescribe:@"通过已有面容ID验证" BlockState:^(TDTouchIDState state, NSError *error) {
        if (state == TDTouchIDStateNotSupport) {    //不支持TouchID/FaceID
            
            UIAlertView *alertview = [[UIAlertView alloc] initWithTitle:@"当前设备不支持生物验证" message:@"请输入密码来验证" delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil];
            alertview.alertViewStyle = UIAlertViewStyleSecureTextInput;
            [alertview show];
            
        } else if (state == TDTouchIDStateSuccess) {    //TouchID/FaceID验证成功
            
            NSLog(@"jump");
            TDHomeViewController *homeVc = [[TDHomeViewController alloc] init];
            [self.navigationController pushViewController:homeVc animated:YES];
            
        } else if (state == TDTouchIDStateInputPassword) { //用户选择手动输入密码
            
            UIAlertView *alertview = [[UIAlertView alloc] initWithTitle:nil message:@"请输入密码" delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil];
            alertview.alertViewStyle = UIAlertViewStyleSecureTextInput;
            [alertview show];
            
        }
        
        // ps:以上的状态处理并没有写完全!
        // 在使用中你需要根据回调的状态进行处理,需要处理什么就处理什么
        
    }];

详细使用方法参见Demo即可

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].