Latest 1.0.0
Homepage https://github.com/zcill/ZCTouchID
License MIT
Platforms ios 8.0, requires ARC
Frameworks Foundation, UIKit, LocalAuthentication
Authors

一行代码在你的App中加入TouchID指纹验证

如果有想要深入了解TouchID方面的内容,可以去看我的一篇博客

LocalAuthentication源码学习

– Installation

使用CocoaPods的话

 pod 'ZCTouchID'

– Usage

导入ZCTouchID.h


    #import <ZCTouchID/ZCTouchID.h>

先判断设备是否支持TouchID指纹识别

    if ([ZCTouchID sharedInstance].canEvaluatePolicy) {
        // 支持指纹识别
    } else {
        // 不支持指纹识别
    }

一行代码加入TouchID验证

        [[ZCTouchID sharedInstance] evaluatePolicyWithLocalizedReason:@"通过Home键验证已有手机指纹" fallbackButtonTitle:@"输入密码" completion:^(ZCTouchIDEvaluateResult result) {

        }];

– ScreenShot

效果图

效果图

使用

use

Latest podspec

{
    "name": "ZCTouchID",
    "version": "1.0.0",
    "summary": "u4e00u884cu4ee3u7801u5728u4f60u7684Appu4e2du52a0u5165TouchIDu6307u7eb9u9a8cu8bc1",
    "homepage": "https://github.com/zcill/ZCTouchID",
    "license": "MIT",
    "authors": {
        "zcill": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/zcill/ZCTouchID.git",
        "tag": "1.0.0"
    },
    "source_files": "ZCTouchID/*.{h,m}",
    "frameworks": [
        "Foundation",
        "UIKit",
        "LocalAuthentication"
    ],
    "requires_arc": true
}

Pin It on Pinterest

Share This