├── FaceID.gif
├── IMG_3457.PNG
├── TDTouchID
├── TDTouchID
│ ├── Assets.xcassets
│ │ ├── Contents.json
│ │ ├── faceID.imageset
│ │ │ ├── faceID@2x.png
│ │ │ ├── faceID@3x.png
│ │ │ └── Contents.json
│ │ ├── AppIcon.appiconset
│ │ │ ├── icon-1024.png
│ │ │ ├── icon-29.png
│ │ │ ├── icon-40.png
│ │ │ ├── icon-76.png
│ │ │ ├── icon-20@2x.png
│ │ │ ├── icon-20@3x.png
│ │ │ ├── icon-29@2x.png
│ │ │ ├── icon-29@3x.png
│ │ │ ├── icon-40@2x.png
│ │ │ ├── icon-40@3x.png
│ │ │ ├── icon-60@2x.png
│ │ │ ├── icon-60@3x.png
│ │ │ ├── icon-76@2x.png
│ │ │ ├── icon-20-ipad.png
│ │ │ ├── icon-29-ipad.png
│ │ │ ├── icon-83.5@2x.png
│ │ │ ├── icon-20@2x-ipad.png
│ │ │ ├── icon-29@2x-ipad.png
│ │ │ └── Contents.json
│ │ └── touchID.imageset
│ │ │ ├── touchID@2x.png
│ │ │ ├── touchID@3x.png
│ │ │ └── Contents.json
│ ├── TDHomeViewController.h
│ ├── TDMainViewController.h
│ ├── AppDelegate.h
│ ├── main.m
│ ├── TDHomeViewController.m
│ ├── Info.plist
│ ├── Base.lproj
│ │ └── LaunchScreen.storyboard
│ ├── AppDelegate.m
│ ├── TDTouchID
│ │ ├── TDTouchID.h
│ │ └── TDTouchID.m
│ └── TDMainViewController.m
├── TDTouchID.xcodeproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── project.pbxproj
└── TDTouchID.podspec
├── README.md
├── .gitignore
└── LICENSE
/FaceID.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/greezi/TDTouchID/HEAD/FaceID.gif
--------------------------------------------------------------------------------
/IMG_3457.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/greezi/TDTouchID/HEAD/IMG_3457.PNG
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID/Assets.xcassets/faceID.imageset/faceID@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/greezi/TDTouchID/HEAD/TDTouchID/TDTouchID/Assets.xcassets/faceID.imageset/faceID@2x.png
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID/Assets.xcassets/faceID.imageset/faceID@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/greezi/TDTouchID/HEAD/TDTouchID/TDTouchID/Assets.xcassets/faceID.imageset/faceID@3x.png
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID/Assets.xcassets/AppIcon.appiconset/icon-1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/greezi/TDTouchID/HEAD/TDTouchID/TDTouchID/Assets.xcassets/AppIcon.appiconset/icon-1024.png
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID/Assets.xcassets/AppIcon.appiconset/icon-29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/greezi/TDTouchID/HEAD/TDTouchID/TDTouchID/Assets.xcassets/AppIcon.appiconset/icon-29.png
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID/Assets.xcassets/AppIcon.appiconset/icon-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/greezi/TDTouchID/HEAD/TDTouchID/TDTouchID/Assets.xcassets/AppIcon.appiconset/icon-40.png
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID/Assets.xcassets/AppIcon.appiconset/icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/greezi/TDTouchID/HEAD/TDTouchID/TDTouchID/Assets.xcassets/AppIcon.appiconset/icon-76.png
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID/Assets.xcassets/touchID.imageset/touchID@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/greezi/TDTouchID/HEAD/TDTouchID/TDTouchID/Assets.xcassets/touchID.imageset/touchID@2x.png
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID/Assets.xcassets/touchID.imageset/touchID@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/greezi/TDTouchID/HEAD/TDTouchID/TDTouchID/Assets.xcassets/touchID.imageset/touchID@3x.png
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/greezi/TDTouchID/HEAD/TDTouchID/TDTouchID/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/greezi/TDTouchID/HEAD/TDTouchID/TDTouchID/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/greezi/TDTouchID/HEAD/TDTouchID/TDTouchID/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/greezi/TDTouchID/HEAD/TDTouchID/TDTouchID/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/greezi/TDTouchID/HEAD/TDTouchID/TDTouchID/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/greezi/TDTouchID/HEAD/TDTouchID/TDTouchID/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/greezi/TDTouchID/HEAD/TDTouchID/TDTouchID/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/greezi/TDTouchID/HEAD/TDTouchID/TDTouchID/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/greezi/TDTouchID/HEAD/TDTouchID/TDTouchID/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID/Assets.xcassets/AppIcon.appiconset/icon-20-ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/greezi/TDTouchID/HEAD/TDTouchID/TDTouchID/Assets.xcassets/AppIcon.appiconset/icon-20-ipad.png
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID/Assets.xcassets/AppIcon.appiconset/icon-29-ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/greezi/TDTouchID/HEAD/TDTouchID/TDTouchID/Assets.xcassets/AppIcon.appiconset/icon-29-ipad.png
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/greezi/TDTouchID/HEAD/TDTouchID/TDTouchID/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID/Assets.xcassets/AppIcon.appiconset/icon-20@2x-ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/greezi/TDTouchID/HEAD/TDTouchID/TDTouchID/Assets.xcassets/AppIcon.appiconset/icon-20@2x-ipad.png
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID/Assets.xcassets/AppIcon.appiconset/icon-29@2x-ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/greezi/TDTouchID/HEAD/TDTouchID/TDTouchID/Assets.xcassets/AppIcon.appiconset/icon-29@2x-ipad.png
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID/TDHomeViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // TDHomeViewController.h
3 | // TDTouchID
4 | //
5 | // Created by imtudou on 2016/11/19.
6 | // Copyright © 2016年 TuDou. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface TDHomeViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID/TDMainViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // TDMainViewController.h
3 | // TDTouchID
4 | //
5 | // Created by imtudou on 2016/11/19.
6 | // Copyright © 2016年 TuDou. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface TDMainViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // TDTouchID
4 | //
5 | // Created by imtudou on 2016/11/20.
6 | // Copyright © 2016年 TuDou. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // TDTouchID
4 | //
5 | // Created by imtudou on 2016/11/20.
6 | // Copyright © 2016年 TuDou. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID/Assets.xcassets/faceID.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "faceID@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "faceID@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID/Assets.xcassets/touchID.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "touchID@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "touchID@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID/TDHomeViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // TDHomeViewController.m
3 | // TDTouchID
4 | //
5 | // Created by imtudou on 2016/11/19.
6 | // Copyright © 2016年 TuDou. All rights reserved.
7 | //
8 |
9 | #import "TDHomeViewController.h"
10 |
11 | @interface TDHomeViewController ()
12 |
13 | @end
14 |
15 | @implementation TDHomeViewController
16 |
17 | - (void)viewDidLoad {
18 |
19 | [super viewDidLoad];
20 |
21 | self.view.backgroundColor = [UIColor greenColor];
22 | self.title = @"已经通过TouchID/FaceID验证";
23 |
24 | }
25 |
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # TDTouchID
2 |
3 | TDTouchID 是一个基于iOS平台的指纹、人脸验证库,可以用来做iOS APP的生物识别验证,例如:登录、支付、隐私空间等验证。
4 |
5 | # ⚠️注意事项⚠️
6 | * 使用面容ID 要在 info.plist 中添加权限
7 | ```
8 | NSFaceIDUsageDescription
9 | 应用程序需要面容ID权限才能使用人脸识别进行身份验证
10 | ```
11 |
12 | # 预览
13 |
14 | |TouchID|FaceID|
15 | |:---:|:---:|
16 | ||
17 |
18 | # 安装方式
19 | * 使用Cocoa Pods安装
20 |
21 | ```
22 | pod 'TDTouchID', '~> 1.0.7'
23 |
24 | ```
25 |
26 | * 手动导入
27 |
28 | 将`TDTouchID`文件夹拖入项目.(里面包含`TDTouchID.h`和`TDTouchID.m`)文件
29 |
30 | * 导入`#import "TDTouchID.h"`即可使用
31 |
32 |
33 |
34 | # 使用方法
35 | ```
36 | - (void)td_showTouchIDWithDescribe:(NSString *)desc FaceIDDescribe:(NSString *)faceDesc AuthFallbackTitle:(NSString *)backTitle BlockState:(StateBlock)block;
37 | ```
38 |
39 | 详细使用方法请参见Demo
40 |
41 |
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | NSFaceIDUsageDescription
24 | 应用程序需要面容ID权限才能使用人脸识别进行身份验证
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## Build generated
6 | build/
7 | DerivedData/
8 |
9 | ## Various settings
10 | *.pbxuser
11 | !default.pbxuser
12 | *.mode1v3
13 | !default.mode1v3
14 | *.mode2v3
15 | !default.mode2v3
16 | *.perspectivev3
17 | !default.perspectivev3
18 | xcuserdata/
19 |
20 | ## Other
21 | *.moved-aside
22 | *.xcuserstate
23 |
24 | ## Obj-C/Swift specific
25 | *.hmap
26 | *.ipa
27 | *.dSYM.zip
28 | *.dSYM
29 |
30 | # CocoaPods
31 | #
32 | # We recommend against adding the Pods directory to your .gitignore. However
33 | # you should judge for yourself, the pros and cons are mentioned at:
34 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
35 | #
36 | # Pods/
37 |
38 | # Carthage
39 | #
40 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
41 | # Carthage/Checkouts
42 |
43 | Carthage/Build
44 |
45 | # fastlane
46 | #
47 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
48 | # screenshots whenever they are needed.
49 | # For more information about the recommended setup visit:
50 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
51 |
52 | fastlane/report.xml
53 | fastlane/screenshots
54 |
55 | #Code Injection
56 | #
57 | # After new code Injection tools there's a generated folder /iOSInjectionProject
58 | # https://github.com/johnno1962/injectionforxcode
59 |
60 | iOSInjectionProject/
61 |
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // TDTouchID
4 | //
5 | // Created by imtudou on 2016/11/20.
6 | // Copyright © 2016年 TuDou. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 | #import "TDMainViewController.h"
11 |
12 | @interface AppDelegate ()
13 |
14 | @end
15 |
16 | @implementation AppDelegate
17 |
18 |
19 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
20 |
21 | self.window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds];
22 |
23 | TDMainViewController *mainVC = [[TDMainViewController alloc] init];
24 | UINavigationController *navVC = [[UINavigationController alloc] initWithRootViewController:mainVC];
25 | self.window.rootViewController = navVC;
26 |
27 | [self.window makeKeyAndVisible];
28 |
29 |
30 | return YES;
31 | }
32 |
33 |
34 | - (void)applicationWillResignActive:(UIApplication *)application {
35 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
36 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
37 | }
38 |
39 |
40 | - (void)applicationDidEnterBackground:(UIApplication *)application {
41 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
42 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
43 | }
44 |
45 |
46 | - (void)applicationWillEnterForeground:(UIApplication *)application {
47 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
48 | }
49 |
50 |
51 | - (void)applicationDidBecomeActive:(UIApplication *)application {
52 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
53 | }
54 |
55 |
56 | - (void)applicationWillTerminate:(UIApplication *)application {
57 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
58 | }
59 |
60 | @end
61 |
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "icon-20@2x.png",
5 | "idiom" : "iphone",
6 | "scale" : "2x",
7 | "size" : "20x20"
8 | },
9 | {
10 | "filename" : "icon-20@3x.png",
11 | "idiom" : "iphone",
12 | "scale" : "3x",
13 | "size" : "20x20"
14 | },
15 | {
16 | "filename" : "icon-29.png",
17 | "idiom" : "iphone",
18 | "scale" : "1x",
19 | "size" : "29x29"
20 | },
21 | {
22 | "filename" : "icon-29@2x.png",
23 | "idiom" : "iphone",
24 | "scale" : "2x",
25 | "size" : "29x29"
26 | },
27 | {
28 | "filename" : "icon-29@3x.png",
29 | "idiom" : "iphone",
30 | "scale" : "3x",
31 | "size" : "29x29"
32 | },
33 | {
34 | "filename" : "icon-40@2x.png",
35 | "idiom" : "iphone",
36 | "scale" : "2x",
37 | "size" : "40x40"
38 | },
39 | {
40 | "filename" : "icon-40@3x.png",
41 | "idiom" : "iphone",
42 | "scale" : "3x",
43 | "size" : "40x40"
44 | },
45 | {
46 | "filename" : "icon-60@2x.png",
47 | "idiom" : "iphone",
48 | "scale" : "2x",
49 | "size" : "60x60"
50 | },
51 | {
52 | "filename" : "icon-60@3x.png",
53 | "idiom" : "iphone",
54 | "scale" : "3x",
55 | "size" : "60x60"
56 | },
57 | {
58 | "filename" : "icon-20-ipad.png",
59 | "idiom" : "ipad",
60 | "scale" : "1x",
61 | "size" : "20x20"
62 | },
63 | {
64 | "filename" : "icon-20@2x-ipad.png",
65 | "idiom" : "ipad",
66 | "scale" : "2x",
67 | "size" : "20x20"
68 | },
69 | {
70 | "filename" : "icon-29-ipad.png",
71 | "idiom" : "ipad",
72 | "scale" : "1x",
73 | "size" : "29x29"
74 | },
75 | {
76 | "filename" : "icon-29@2x-ipad.png",
77 | "idiom" : "ipad",
78 | "scale" : "2x",
79 | "size" : "29x29"
80 | },
81 | {
82 | "filename" : "icon-40.png",
83 | "idiom" : "ipad",
84 | "scale" : "1x",
85 | "size" : "40x40"
86 | },
87 | {
88 | "filename" : "icon-40@2x.png",
89 | "idiom" : "ipad",
90 | "scale" : "2x",
91 | "size" : "40x40"
92 | },
93 | {
94 | "filename" : "icon-76.png",
95 | "idiom" : "ipad",
96 | "scale" : "1x",
97 | "size" : "76x76"
98 | },
99 | {
100 | "filename" : "icon-76@2x.png",
101 | "idiom" : "ipad",
102 | "scale" : "2x",
103 | "size" : "76x76"
104 | },
105 | {
106 | "filename" : "icon-83.5@2x.png",
107 | "idiom" : "ipad",
108 | "scale" : "2x",
109 | "size" : "83.5x83.5"
110 | },
111 | {
112 | "filename" : "icon-1024.png",
113 | "idiom" : "ios-marketing",
114 | "scale" : "1x",
115 | "size" : "1024x1024"
116 | }
117 | ],
118 | "info" : {
119 | "author" : "xcode",
120 | "version" : 1
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID/TDTouchID/TDTouchID.h:
--------------------------------------------------------------------------------
1 | //
2 | // TDTouchID.h
3 | // TDTouchID
4 | //
5 | // Created by imtudou on 2016/11/19.
6 | // Copyright © 2016年 TuDou. All rights reserved.
7 | //
8 |
9 |
10 | #import
11 |
12 | /****
13 | ⚠️⚠️⚠️
14 | 注意: 使用面容ID 要在 info.plist 中添加权限
15 |
16 | NSFaceIDUsageDescription
17 | 应用程序需要面容ID权限才能使用人脸识别进行身份验证
18 |
19 | */
20 |
21 | /**
22 | * 设备支持的生物验证方式
23 | */
24 | typedef enum : NSUInteger {
25 | /**
26 | * 支持TouchID验证
27 | */
28 | TDTouchIDSupperTypeTouchID = 1,
29 | /**
30 | * 支持FaceID验证
31 | */
32 | TDTouchIDSupperTypeFaceID,
33 | /**
34 | * 不支持支持验证
35 | */
36 | TDTouchIDSupperTypeNone,
37 | } TDTouchIDSupperType;
38 |
39 |
40 | /**
41 | * TouchID 状态
42 | */
43 | typedef enum : NSUInteger {
44 | /**
45 | * 当前设备不支持生物验证
46 | */
47 | TDTouchIDStateNotSupport = 1,
48 | /**
49 | * 生物验证 验证成功
50 | */
51 | TDTouchIDStateSuccess,
52 | /**
53 | * 生物验证 验证失败
54 | */
55 | TDTouchIDStateFail,
56 | /**
57 | * 生物验证 被用户手动取消
58 | */
59 | TDTouchIDStateUserCancel,
60 | /**
61 | * 用户不使用生物验证,选择手动输入密码
62 | */
63 | TDTouchIDStateInputPassword,
64 | /**
65 | * 生物验证 被系统取消 (如遇到来电,锁屏,按了Home键等)
66 | */
67 | TDTouchIDStateSystemCancel,
68 | /**
69 | * 生物验证 无法启动,因为用户没有设置密码
70 | */
71 | TDTouchIDStatePasswordNotSet,
72 | /**
73 | * 生物验证 无法启动,因为用户没有设置生物验证
74 | */
75 | TDTouchIDStateTouchIDNotSet,
76 | /**
77 | * 生物验证 无效
78 | */
79 | TDTouchIDStateTouchIDNotAvailable,
80 | /**
81 | * 生物验证 被锁定(连续多次验证生物验证失败,系统需要用户手动输入密码)
82 | */
83 | TDTouchIDStateTouchIDLockout,
84 | /**
85 | * 当前软件被挂起并取消了授权 (如App进入了后台等)
86 | */
87 | TDTouchIDStateAppCancel,
88 | /**
89 | * 当前软件被挂起并取消了授权 (LAContext对象无效)
90 | */
91 | TDTouchIDStateInvalidContext,
92 | /**
93 | * 系统版本不支持生物验证 (必须高于iOS 8.0才能使用)
94 | */
95 | TDTouchIDStateVersionNotSupport,
96 | } TDTouchIDState;
97 |
98 | @interface TDTouchID : LAContext
99 |
100 | typedef void (^StateBlock)(TDTouchIDState state,NSError *error);
101 |
102 | /// 单例
103 | + (instancetype)sharedInstance;
104 |
105 |
106 | /// 是否显示日志信息
107 | @property (nonatomic, assign) BOOL disableLogs;
108 |
109 | /// 启动生物验证
110 | /// - Parameters:
111 | /// - desc: Touch显示的描述
112 | /// - block: 回调状态的block
113 | - (void)td_showTouchIDWithDescribe:(NSString *)desc BlockState:(StateBlock)block;
114 |
115 |
116 | /// 启动生物验证
117 | ///- Parameters:
118 | /// - desc: Touch显示的描述
119 | /// - faceDesc: FaceID状态下显示的描述
120 | /// - block: 回调状态的block
121 | - (void)td_showTouchIDWithDescribe:(NSString *)desc FaceIDDescribe:(NSString *)faceDesc BlockState:(StateBlock)block;
122 |
123 |
124 | /// 启动生物验证
125 | ///- Parameters:
126 | /// - desc: Touch显示的描述
127 | /// - faceDesc: FaceID状态下显示的描述
128 | /// - backTitle: 错误一次之后,会显示 backTitle 按钮, 如果不想显示 backTitle 按钮,可以设置 backTitle = @""
129 | /// - block: 回调状态的block
130 | - (void)td_showTouchIDWithDescribe:(NSString *)desc FaceIDDescribe:(NSString *)faceDesc AuthFallbackTitle:(NSString *)backTitle BlockState:(StateBlock)block;
131 |
132 |
133 | /// 判断设备支持的生物验证方式 (TouchID / FaceID / None)
134 | - (TDTouchIDSupperType)td_canSupperBiometrics;
135 |
136 |
137 | @end
138 |
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID/TDMainViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // TDMainViewController.m
3 | // TDTouchID
4 | //
5 | // Created by imtudou on 2016/11/19.
6 | // Copyright © 2016年 TuDou. All rights reserved.
7 | //
8 |
9 | #import "TDMainViewController.h"
10 | #import "TDTouchID.h"
11 | #import "TDHomeViewController.h"
12 |
13 | @interface TDMainViewController ()
14 |
15 | @end
16 |
17 | @implementation TDMainViewController
18 |
19 | - (void)viewDidLoad {
20 | [super viewDidLoad];
21 |
22 | self.view.backgroundColor = [UIColor whiteColor];
23 | self.title = @"生物验证(TDTouchID)";
24 |
25 | UIButton *touchIDButton = [[UIButton alloc] init];
26 | [touchIDButton addTarget:self action:@selector(touchVerification) forControlEvents:UIControlEventTouchDown];
27 | touchIDButton.frame = CGRectMake((self.view.frame.size.width / 2) - 30, (self.view.frame.size.height / 2) - 30, 60, 60);
28 | [self.view addSubview:touchIDButton];
29 |
30 |
31 | //判断是否支持生物验证(此处根据不同类型来显示不同的图标)
32 | TDTouchIDSupperType type = [[TDTouchID sharedInstance] td_canSupperBiometrics];
33 | switch (type) {
34 | case TDTouchIDSupperTypeFaceID:
35 | NSLog(@"😄支持FaceID");
36 | [touchIDButton setBackgroundImage:[UIImage imageNamed:@"faceID"] forState:UIControlStateNormal];
37 | break;
38 | case TDTouchIDSupperTypeTouchID:
39 | NSLog(@"😄支持TouchID");
40 | [touchIDButton setBackgroundImage:[UIImage imageNamed:@"touchID"] forState:UIControlStateNormal];
41 | break;
42 | case TDTouchIDSupperTypeNone:
43 | NSLog(@"😭不支持生物验证");
44 | [touchIDButton setBackgroundImage:[UIImage imageNamed:@"touchID"] forState:UIControlStateNormal];
45 | break;
46 | default:
47 | break;
48 | }
49 |
50 | }
51 |
52 |
53 | /**
54 | 验证 TouchID
55 | */
56 | - (void)touchVerification {
57 |
58 | // 显示Logs
59 | [TDTouchID sharedInstance].disableLogs = NO;
60 |
61 | // 启动验证
62 | [[TDTouchID sharedInstance] td_showTouchIDWithDescribe:@"通过Home键验证已有指纹" FaceIDDescribe:@"通过已有面容ID验证" AuthFallbackTitle:@"输入密码验证" BlockState:^(TDTouchIDState state, NSError *error) {
63 |
64 | switch (state) {
65 | case TDTouchIDStateNotSupport: //不支持TouchID/FaceID
66 | {
67 | UIAlertView *alertview = [[UIAlertView alloc] initWithTitle:@"当前设备不支持生物验证" message:@"请输入密码来验证" delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil];
68 | alertview.alertViewStyle = UIAlertViewStyleSecureTextInput;
69 | [alertview show];
70 | }
71 | break;
72 | case TDTouchIDStateSuccess: //TouchID/FaceID验证成功
73 | {
74 | TDHomeViewController *homeVc = [[TDHomeViewController alloc] init];
75 | [self.navigationController pushViewController:homeVc animated:YES];
76 | }
77 | break;
78 | case TDTouchIDStateInputPassword: //用户选择手动输入密码
79 | {
80 | UIAlertView *alertview = [[UIAlertView alloc] initWithTitle:nil message:@"请输入密码" delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil];
81 | alertview.alertViewStyle = UIAlertViewStyleSecureTextInput;
82 | [alertview show];
83 | }
84 | break;
85 | // 以上的状态处理并没有写完全! 根据需要的状态进行处理即可.
86 | default:
87 | {
88 | // ...
89 | }
90 | break;
91 | }
92 |
93 | }];
94 |
95 | }
96 |
97 | @end
98 |
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID.podspec:
--------------------------------------------------------------------------------
1 | #
2 | # Be sure to run `pod spec lint TDTouchID.podspec' to ensure this is a
3 | # valid spec and to remove all comments including this before submitting the spec.
4 | #
5 | # To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html
6 | # To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/
7 | #
8 |
9 | Pod::Spec.new do |s|
10 |
11 | # ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
12 | #
13 | # These will help people to find your library, and whilst it
14 | # can feel like a chore to fill in it's definitely to your advantage. The
15 | # summary should be tweet-length, and the description more in depth.
16 | #
17 |
18 | s.name = "TDTouchID"
19 | s.version = "1.0.7"
20 | s.summary = "TouchID/FaceID for iOS."
21 |
22 | # This description is used to generate tags and improve search results.
23 | # * Think: What does it do? Why did you write it? What is the focus?
24 | # * Try to keep it short, snappy and to the point.
25 | # * Write the description between the DESC delimiters below.
26 | # * Finally, don't worry about the indent, CocoaPods strips it!
27 | s.description = "TDTouchID是一个封装好的指纹验证库,可以用来做iOSAPP的登录/支付等验证。"
28 |
29 | s.homepage = "https://github.com/greezi/TDTouchID"
30 | # s.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif"
31 |
32 |
33 | # ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
34 | #
35 | # Licensing your code is important. See http://choosealicense.com for more info.
36 | # CocoaPods will detect a license file if there is a named LICENSE*
37 | # Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'.
38 | #
39 |
40 | s.license = "Apache-2.0"
41 | # s.license = { :type => "MIT", :file => "FILE_LICENSE" }
42 |
43 |
44 | # ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
45 | #
46 | # Specify the authors of the library, with email addresses. Email addresses
47 | # of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also
48 | # accepts just a name if you'd rather not provide an email address.
49 | #
50 | # Specify a social_media_url where others can refer to, for example a twitter
51 | # profile URL.
52 | #
53 |
54 | s.author = { "imtudou" => "greezi@163.com" }
55 | # Or just: s.author = "imtudou"
56 | # s.authors = { "imtudou" => "" }
57 | # s.social_media_url = "http://twitter.com/imtudou"
58 |
59 | # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
60 | #
61 | # If this Pod runs only on iOS or OS X, then specify the platform and
62 | # the deployment target. You can optionally include the target after the platform.
63 | #
64 |
65 | # s.platform = :ios
66 | s.platform = :ios, "8.0"
67 |
68 | # When using multiple platforms
69 | # s.ios.deployment_target = "5.0"
70 | # s.osx.deployment_target = "10.7"
71 | # s.watchos.deployment_target = "2.0"
72 | # s.tvos.deployment_target = "9.0"
73 |
74 |
75 | # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
76 | #
77 | # Specify the location from where the source should be retrieved.
78 | # Supports git, hg, bzr, svn and HTTP.
79 | #
80 |
81 | s.source = { :git => "https://github.com/greezi/TDTouchID.git", :tag => s.version }
82 |
83 |
84 | # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
85 | #
86 | # CocoaPods is smart about how it includes source code. For source files
87 | # giving a folder will include any swift, h, m, mm, c & cpp files.
88 | # For header files it will include any header in the folder.
89 | # Not including the public_header_files will make all headers public.
90 | #
91 |
92 | s.source_files = "TDTouchID", "TDTouchID/TDTouchID/TDTouchID/**/*.{h,m}"
93 | #s.exclude_files = "Classes/Exclude"
94 |
95 | # s.public_header_files = "Classes/**/*.h"
96 |
97 |
98 | # ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
99 | #
100 | # A list of resources included with the Pod. These are copied into the
101 | # target bundle with a build phase script. Anything else will be cleaned.
102 | # You can preserve files from being cleaned, please don't preserve
103 | # non-essential files like tests, examples and documentation.
104 | #
105 |
106 | # s.resource = "icon.png"
107 | # s.resources = "Resources/*.png"
108 |
109 | # s.preserve_paths = "FilesToSave", "MoreFilesToSave"
110 |
111 |
112 | # ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
113 | #
114 | # Link your library with frameworks, or libraries. Libraries do not include
115 | # the lib prefix of their name.
116 | #
117 |
118 | s.framework = "LocalAuthentication"
119 | # s.frameworks = "SomeFramework", "AnotherFramework"
120 |
121 | # s.library = "iconv"
122 | # s.libraries = "iconv", "xml2"
123 |
124 |
125 | # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
126 | #
127 | # If your library depends on compiler flags you can set them in the xcconfig hash
128 | # where they will only apply to your library. If you depend on other Podspecs
129 | # you can include multiple dependencies to ensure it works.
130 |
131 | # s.requires_arc = true
132 |
133 | # s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" }
134 | # s.dependency "JSONKit", "~> 1.4"
135 |
136 | end
137 |
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID/TDTouchID/TDTouchID.m:
--------------------------------------------------------------------------------
1 | //
2 | // TDTouchID.m
3 | // TDTouchID
4 | //
5 | // Created by imtudou on 2016/11/19.
6 | // Copyright © 2016年 TuDou. All rights reserved.
7 | //
8 |
9 | #import "TDTouchID.h"
10 |
11 | @implementation TDTouchID
12 |
13 | + (instancetype)sharedInstance {
14 | static TDTouchID *instance = nil;
15 | static dispatch_once_t onceToken;
16 | dispatch_once(&onceToken, ^{
17 | instance = [[TDTouchID alloc] init];
18 | instance.disableLogs = NO;
19 | });
20 | return instance;
21 | }
22 |
23 | - (void)td_showTouchIDWithDescribe:(NSString *)desc FaceIDDescribe:(NSString *)faceDesc AuthFallbackTitle:(NSString *)backTitle BlockState:(StateBlock)block {
24 |
25 | TDTouchIDSupperType supperType = [self td_canSupperBiometrics];
26 |
27 | NSString *descStr;
28 | switch (supperType) {
29 | case TDTouchIDSupperTypeTouchID:
30 | {
31 | descStr = desc.length == 0 ? @"通过Home键验证已有指纹" : desc;
32 | }
33 | break;
34 | case TDTouchIDSupperTypeFaceID:
35 | {
36 | descStr = faceDesc.length == 0 ? @"通过已有面容ID验证" : faceDesc;
37 | }
38 | default:
39 | break;
40 | }
41 |
42 | if (@available(iOS 8.0, *)) {
43 |
44 | LAContext *context = [[LAContext alloc] init];
45 |
46 | context.localizedFallbackTitle = backTitle == nil ? @"输入密码验证" : backTitle;
47 |
48 | NSError *error = nil;
49 |
50 | if ([context canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&error]) {
51 |
52 | [context evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics localizedReason:descStr reply:^(BOOL success, NSError * _Nullable error) {
53 |
54 | if (success) {
55 | dispatch_async(dispatch_get_main_queue(), ^{
56 | [TDTouchID sharedInstance].disableLogs ? : NSLog(@"TouchID 验证成功");
57 | block(TDTouchIDStateSuccess,error);
58 | });
59 | }else if(error) {
60 |
61 | switch (error.code) {
62 | case LAErrorAuthenticationFailed:{
63 | dispatch_async(dispatch_get_main_queue(), ^{
64 | [TDTouchID sharedInstance].disableLogs ? : NSLog(@"TouchID 验证失败");
65 | block(TDTouchIDStateFail,error);
66 | });
67 | break;
68 | }
69 | case LAErrorUserCancel:{
70 | dispatch_async(dispatch_get_main_queue(), ^{
71 | [TDTouchID sharedInstance].disableLogs ? : NSLog(@"TouchID 被用户手动取消");
72 | block(TDTouchIDStateUserCancel,error);
73 | });
74 | }
75 | break;
76 | case LAErrorUserFallback:{
77 | dispatch_async(dispatch_get_main_queue(), ^{
78 | [TDTouchID sharedInstance].disableLogs ? : NSLog(@"用户不使用TouchID,选择手动输入密码");
79 | block(TDTouchIDStateInputPassword,error);
80 | });
81 | }
82 | break;
83 | case LAErrorSystemCancel:{
84 | dispatch_async(dispatch_get_main_queue(), ^{
85 | [TDTouchID sharedInstance].disableLogs ? : NSLog(@"TouchID 被系统取消 (如遇到来电,锁屏,按了Home键等)");
86 | block(TDTouchIDStateSystemCancel,error);
87 | });
88 | }
89 | break;
90 | case LAErrorPasscodeNotSet:{
91 | dispatch_async(dispatch_get_main_queue(), ^{
92 | [TDTouchID sharedInstance].disableLogs ? : NSLog(@"TouchID 无法启动,因为用户没有设置密码");
93 | block(TDTouchIDStatePasswordNotSet,error);
94 | });
95 | }
96 | break;
97 | case LAErrorTouchIDNotEnrolled:{
98 | dispatch_async(dispatch_get_main_queue(), ^{
99 | [TDTouchID sharedInstance].disableLogs ? : NSLog(@"TouchID 无法启动,因为用户没有设置TouchID");
100 | block(TDTouchIDStateTouchIDNotSet,error);
101 | });
102 | }
103 | break;
104 | case LAErrorTouchIDNotAvailable:{
105 | dispatch_async(dispatch_get_main_queue(), ^{
106 | [TDTouchID sharedInstance].disableLogs ? : NSLog(@"TouchID 无效");
107 | block(TDTouchIDStateTouchIDNotAvailable,error);
108 | });
109 | }
110 | break;
111 | case LAErrorTouchIDLockout:{
112 | dispatch_async(dispatch_get_main_queue(), ^{
113 | [TDTouchID sharedInstance].disableLogs ? : NSLog(@"TouchID 被锁定(连续多次验证TouchID失败,系统需要用户手动输入密码)");
114 | block(TDTouchIDStateTouchIDLockout,error);
115 | });
116 | }
117 | break;
118 | case LAErrorAppCancel:{
119 | dispatch_async(dispatch_get_main_queue(), ^{
120 | [TDTouchID sharedInstance].disableLogs ? : NSLog(@"当前软件被挂起并取消了授权 (如App进入了后台等)");
121 | block(TDTouchIDStateAppCancel,error);
122 | });
123 | }
124 | break;
125 | case LAErrorInvalidContext:{
126 | dispatch_async(dispatch_get_main_queue(), ^{
127 | [TDTouchID sharedInstance].disableLogs ? : NSLog(@"当前软件被挂起并取消了授权 (LAContext对象无效)");
128 | block(TDTouchIDStateInvalidContext,error);
129 | });
130 | }
131 | break;
132 | default:
133 | break;
134 | }
135 | }
136 | }];
137 |
138 | }else{
139 |
140 | dispatch_async(dispatch_get_main_queue(), ^{
141 | [TDTouchID sharedInstance].disableLogs ? : NSLog(@"当前设备不支持TouchID");
142 | block(TDTouchIDStateNotSupport,error);
143 | });
144 |
145 | }
146 | } else {
147 | dispatch_async(dispatch_get_main_queue(), ^{
148 | [TDTouchID sharedInstance].disableLogs ? : NSLog(@"系统版本不支持TouchID (必须高于iOS 8.0才能使用)");
149 | block(TDTouchIDStateVersionNotSupport,nil);
150 | });
151 | }
152 |
153 |
154 | }
155 |
156 | - (void)td_showTouchIDWithDescribe:(NSString *)desc BlockState:(StateBlock)block{
157 | [self td_showTouchIDWithDescribe:desc FaceIDDescribe:nil BlockState:block];
158 | }
159 |
160 | - (void)td_showTouchIDWithDescribe:(NSString *)desc FaceIDDescribe:(NSString *)faceDesc BlockState:(StateBlock)block {
161 | [self td_showTouchIDWithDescribe:desc FaceIDDescribe:faceDesc AuthFallbackTitle:nil BlockState:block];
162 | }
163 |
164 | // 判断设备支持哪种认证方式 TouchID & FaceID
165 | - (TDTouchIDSupperType)td_canSupperBiometrics {
166 | LAContext *context = [[LAContext alloc] init];
167 | NSError *error;
168 | if ([context canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&error]) {
169 | if (error != nil) {
170 | return TDTouchIDSupperTypeNone;
171 | }
172 | if (@available(iOS 11.0, *)) {
173 | return context.biometryType == LABiometryTypeFaceID ? TDTouchIDSupperTypeFaceID : TDTouchIDSupperTypeTouchID;
174 | }
175 | }
176 | return TDTouchIDSupperTypeNone;
177 | }
178 |
179 |
180 | @end
181 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "{}"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright {yyyy} {name of copyright owner}
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/TDTouchID/TDTouchID.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | DBC98D881DE17CF600CBF7DE /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = DBC98D871DE17CF600CBF7DE /* main.m */; };
11 | DBC98D8B1DE17CF600CBF7DE /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DBC98D8A1DE17CF600CBF7DE /* AppDelegate.m */; };
12 | DBC98D931DE17CF600CBF7DE /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DBC98D921DE17CF600CBF7DE /* Assets.xcassets */; };
13 | DBC98D961DE17CF600CBF7DE /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DBC98D941DE17CF600CBF7DE /* LaunchScreen.storyboard */; };
14 | DBC98DA11DE17D5400CBF7DE /* TDHomeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DBC98D9E1DE17D5400CBF7DE /* TDHomeViewController.m */; };
15 | DBC98DA21DE17D5400CBF7DE /* TDMainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DBC98DA01DE17D5400CBF7DE /* TDMainViewController.m */; };
16 | DBC98DA61DE17D9C00CBF7DE /* TDTouchID.m in Sources */ = {isa = PBXBuildFile; fileRef = DBC98DA51DE17D9C00CBF7DE /* TDTouchID.m */; };
17 | /* End PBXBuildFile section */
18 |
19 | /* Begin PBXFileReference section */
20 | DBC98D831DE17CF600CBF7DE /* TDTouchID.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TDTouchID.app; sourceTree = BUILT_PRODUCTS_DIR; };
21 | DBC98D871DE17CF600CBF7DE /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
22 | DBC98D891DE17CF600CBF7DE /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
23 | DBC98D8A1DE17CF600CBF7DE /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
24 | DBC98D921DE17CF600CBF7DE /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
25 | DBC98D951DE17CF600CBF7DE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
26 | DBC98D971DE17CF600CBF7DE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
27 | DBC98D9D1DE17D5400CBF7DE /* TDHomeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TDHomeViewController.h; sourceTree = ""; };
28 | DBC98D9E1DE17D5400CBF7DE /* TDHomeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TDHomeViewController.m; sourceTree = ""; };
29 | DBC98D9F1DE17D5400CBF7DE /* TDMainViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TDMainViewController.h; sourceTree = ""; };
30 | DBC98DA01DE17D5400CBF7DE /* TDMainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TDMainViewController.m; sourceTree = ""; };
31 | DBC98DA41DE17D9C00CBF7DE /* TDTouchID.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TDTouchID.h; sourceTree = ""; };
32 | DBC98DA51DE17D9C00CBF7DE /* TDTouchID.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TDTouchID.m; sourceTree = ""; };
33 | /* End PBXFileReference section */
34 |
35 | /* Begin PBXFrameworksBuildPhase section */
36 | DBC98D801DE17CF600CBF7DE /* Frameworks */ = {
37 | isa = PBXFrameworksBuildPhase;
38 | buildActionMask = 2147483647;
39 | files = (
40 | );
41 | runOnlyForDeploymentPostprocessing = 0;
42 | };
43 | /* End PBXFrameworksBuildPhase section */
44 |
45 | /* Begin PBXGroup section */
46 | DBC98D7A1DE17CF600CBF7DE = {
47 | isa = PBXGroup;
48 | children = (
49 | DBC98D851DE17CF600CBF7DE /* TDTouchID */,
50 | DBC98D841DE17CF600CBF7DE /* Products */,
51 | );
52 | sourceTree = "";
53 | };
54 | DBC98D841DE17CF600CBF7DE /* Products */ = {
55 | isa = PBXGroup;
56 | children = (
57 | DBC98D831DE17CF600CBF7DE /* TDTouchID.app */,
58 | );
59 | name = Products;
60 | sourceTree = "";
61 | };
62 | DBC98D851DE17CF600CBF7DE /* TDTouchID */ = {
63 | isa = PBXGroup;
64 | children = (
65 | DBC98DA31DE17D9C00CBF7DE /* TDTouchID */,
66 | DBC98D891DE17CF600CBF7DE /* AppDelegate.h */,
67 | DBC98D8A1DE17CF600CBF7DE /* AppDelegate.m */,
68 | DBC98D9F1DE17D5400CBF7DE /* TDMainViewController.h */,
69 | DBC98DA01DE17D5400CBF7DE /* TDMainViewController.m */,
70 | DBC98D9D1DE17D5400CBF7DE /* TDHomeViewController.h */,
71 | DBC98D9E1DE17D5400CBF7DE /* TDHomeViewController.m */,
72 | DBC98D921DE17CF600CBF7DE /* Assets.xcassets */,
73 | DBC98D941DE17CF600CBF7DE /* LaunchScreen.storyboard */,
74 | DBC98D971DE17CF600CBF7DE /* Info.plist */,
75 | DBC98D861DE17CF600CBF7DE /* Supporting Files */,
76 | );
77 | path = TDTouchID;
78 | sourceTree = "";
79 | };
80 | DBC98D861DE17CF600CBF7DE /* Supporting Files */ = {
81 | isa = PBXGroup;
82 | children = (
83 | DBC98D871DE17CF600CBF7DE /* main.m */,
84 | );
85 | name = "Supporting Files";
86 | sourceTree = "";
87 | };
88 | DBC98DA31DE17D9C00CBF7DE /* TDTouchID */ = {
89 | isa = PBXGroup;
90 | children = (
91 | DBC98DA41DE17D9C00CBF7DE /* TDTouchID.h */,
92 | DBC98DA51DE17D9C00CBF7DE /* TDTouchID.m */,
93 | );
94 | path = TDTouchID;
95 | sourceTree = "";
96 | };
97 | /* End PBXGroup section */
98 |
99 | /* Begin PBXNativeTarget section */
100 | DBC98D821DE17CF600CBF7DE /* TDTouchID */ = {
101 | isa = PBXNativeTarget;
102 | buildConfigurationList = DBC98D9A1DE17CF600CBF7DE /* Build configuration list for PBXNativeTarget "TDTouchID" */;
103 | buildPhases = (
104 | DBC98D7F1DE17CF600CBF7DE /* Sources */,
105 | DBC98D801DE17CF600CBF7DE /* Frameworks */,
106 | DBC98D811DE17CF600CBF7DE /* Resources */,
107 | );
108 | buildRules = (
109 | );
110 | dependencies = (
111 | );
112 | name = TDTouchID;
113 | productName = TDTouchID;
114 | productReference = DBC98D831DE17CF600CBF7DE /* TDTouchID.app */;
115 | productType = "com.apple.product-type.application";
116 | };
117 | /* End PBXNativeTarget section */
118 |
119 | /* Begin PBXProject section */
120 | DBC98D7B1DE17CF600CBF7DE /* Project object */ = {
121 | isa = PBXProject;
122 | attributes = {
123 | LastUpgradeCheck = 0810;
124 | ORGANIZATIONNAME = TuDou;
125 | TargetAttributes = {
126 | DBC98D821DE17CF600CBF7DE = {
127 | CreatedOnToolsVersion = 8.1;
128 | DevelopmentTeam = ZJKJV77SHR;
129 | ProvisioningStyle = Automatic;
130 | };
131 | };
132 | };
133 | buildConfigurationList = DBC98D7E1DE17CF600CBF7DE /* Build configuration list for PBXProject "TDTouchID" */;
134 | compatibilityVersion = "Xcode 3.2";
135 | developmentRegion = English;
136 | hasScannedForEncodings = 0;
137 | knownRegions = (
138 | English,
139 | en,
140 | Base,
141 | );
142 | mainGroup = DBC98D7A1DE17CF600CBF7DE;
143 | productRefGroup = DBC98D841DE17CF600CBF7DE /* Products */;
144 | projectDirPath = "";
145 | projectRoot = "";
146 | targets = (
147 | DBC98D821DE17CF600CBF7DE /* TDTouchID */,
148 | );
149 | };
150 | /* End PBXProject section */
151 |
152 | /* Begin PBXResourcesBuildPhase section */
153 | DBC98D811DE17CF600CBF7DE /* Resources */ = {
154 | isa = PBXResourcesBuildPhase;
155 | buildActionMask = 2147483647;
156 | files = (
157 | DBC98D961DE17CF600CBF7DE /* LaunchScreen.storyboard in Resources */,
158 | DBC98D931DE17CF600CBF7DE /* Assets.xcassets in Resources */,
159 | );
160 | runOnlyForDeploymentPostprocessing = 0;
161 | };
162 | /* End PBXResourcesBuildPhase section */
163 |
164 | /* Begin PBXSourcesBuildPhase section */
165 | DBC98D7F1DE17CF600CBF7DE /* Sources */ = {
166 | isa = PBXSourcesBuildPhase;
167 | buildActionMask = 2147483647;
168 | files = (
169 | DBC98DA61DE17D9C00CBF7DE /* TDTouchID.m in Sources */,
170 | DBC98DA11DE17D5400CBF7DE /* TDHomeViewController.m in Sources */,
171 | DBC98DA21DE17D5400CBF7DE /* TDMainViewController.m in Sources */,
172 | DBC98D8B1DE17CF600CBF7DE /* AppDelegate.m in Sources */,
173 | DBC98D881DE17CF600CBF7DE /* main.m in Sources */,
174 | );
175 | runOnlyForDeploymentPostprocessing = 0;
176 | };
177 | /* End PBXSourcesBuildPhase section */
178 |
179 | /* Begin PBXVariantGroup section */
180 | DBC98D941DE17CF600CBF7DE /* LaunchScreen.storyboard */ = {
181 | isa = PBXVariantGroup;
182 | children = (
183 | DBC98D951DE17CF600CBF7DE /* Base */,
184 | );
185 | name = LaunchScreen.storyboard;
186 | sourceTree = "";
187 | };
188 | /* End PBXVariantGroup section */
189 |
190 | /* Begin XCBuildConfiguration section */
191 | DBC98D981DE17CF600CBF7DE /* Debug */ = {
192 | isa = XCBuildConfiguration;
193 | buildSettings = {
194 | ALWAYS_SEARCH_USER_PATHS = NO;
195 | CLANG_ANALYZER_NONNULL = YES;
196 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
197 | CLANG_CXX_LIBRARY = "libc++";
198 | CLANG_ENABLE_MODULES = YES;
199 | CLANG_ENABLE_OBJC_ARC = YES;
200 | CLANG_WARN_BOOL_CONVERSION = YES;
201 | CLANG_WARN_CONSTANT_CONVERSION = YES;
202 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
203 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
204 | CLANG_WARN_EMPTY_BODY = YES;
205 | CLANG_WARN_ENUM_CONVERSION = YES;
206 | CLANG_WARN_INFINITE_RECURSION = YES;
207 | CLANG_WARN_INT_CONVERSION = YES;
208 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
209 | CLANG_WARN_SUSPICIOUS_MOVES = YES;
210 | CLANG_WARN_UNREACHABLE_CODE = YES;
211 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
212 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
213 | COPY_PHASE_STRIP = NO;
214 | DEBUG_INFORMATION_FORMAT = dwarf;
215 | ENABLE_STRICT_OBJC_MSGSEND = YES;
216 | ENABLE_TESTABILITY = YES;
217 | GCC_C_LANGUAGE_STANDARD = gnu99;
218 | GCC_DYNAMIC_NO_PIC = NO;
219 | GCC_NO_COMMON_BLOCKS = YES;
220 | GCC_OPTIMIZATION_LEVEL = 0;
221 | GCC_PREPROCESSOR_DEFINITIONS = (
222 | "DEBUG=1",
223 | "$(inherited)",
224 | );
225 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
226 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
227 | GCC_WARN_UNDECLARED_SELECTOR = YES;
228 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
229 | GCC_WARN_UNUSED_FUNCTION = YES;
230 | GCC_WARN_UNUSED_VARIABLE = YES;
231 | IPHONEOS_DEPLOYMENT_TARGET = 10.1;
232 | MTL_ENABLE_DEBUG_INFO = YES;
233 | ONLY_ACTIVE_ARCH = YES;
234 | SDKROOT = iphoneos;
235 | };
236 | name = Debug;
237 | };
238 | DBC98D991DE17CF600CBF7DE /* Release */ = {
239 | isa = XCBuildConfiguration;
240 | buildSettings = {
241 | ALWAYS_SEARCH_USER_PATHS = NO;
242 | CLANG_ANALYZER_NONNULL = YES;
243 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
244 | CLANG_CXX_LIBRARY = "libc++";
245 | CLANG_ENABLE_MODULES = YES;
246 | CLANG_ENABLE_OBJC_ARC = YES;
247 | CLANG_WARN_BOOL_CONVERSION = YES;
248 | CLANG_WARN_CONSTANT_CONVERSION = YES;
249 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
250 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
251 | CLANG_WARN_EMPTY_BODY = YES;
252 | CLANG_WARN_ENUM_CONVERSION = YES;
253 | CLANG_WARN_INFINITE_RECURSION = YES;
254 | CLANG_WARN_INT_CONVERSION = YES;
255 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
256 | CLANG_WARN_SUSPICIOUS_MOVES = YES;
257 | CLANG_WARN_UNREACHABLE_CODE = YES;
258 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
259 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
260 | COPY_PHASE_STRIP = NO;
261 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
262 | ENABLE_NS_ASSERTIONS = NO;
263 | ENABLE_STRICT_OBJC_MSGSEND = YES;
264 | GCC_C_LANGUAGE_STANDARD = gnu99;
265 | GCC_NO_COMMON_BLOCKS = YES;
266 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
267 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
268 | GCC_WARN_UNDECLARED_SELECTOR = YES;
269 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
270 | GCC_WARN_UNUSED_FUNCTION = YES;
271 | GCC_WARN_UNUSED_VARIABLE = YES;
272 | IPHONEOS_DEPLOYMENT_TARGET = 10.1;
273 | MTL_ENABLE_DEBUG_INFO = NO;
274 | SDKROOT = iphoneos;
275 | VALIDATE_PRODUCT = YES;
276 | };
277 | name = Release;
278 | };
279 | DBC98D9B1DE17CF600CBF7DE /* Debug */ = {
280 | isa = XCBuildConfiguration;
281 | buildSettings = {
282 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
283 | DEVELOPMENT_TEAM = ZJKJV77SHR;
284 | INFOPLIST_FILE = TDTouchID/Info.plist;
285 | IPHONEOS_DEPLOYMENT_TARGET = 11.0;
286 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
287 | PRODUCT_BUNDLE_IDENTIFIER = com.tudou.TDTouchID.demo;
288 | PRODUCT_NAME = "$(TARGET_NAME)";
289 | };
290 | name = Debug;
291 | };
292 | DBC98D9C1DE17CF600CBF7DE /* Release */ = {
293 | isa = XCBuildConfiguration;
294 | buildSettings = {
295 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
296 | DEVELOPMENT_TEAM = ZJKJV77SHR;
297 | INFOPLIST_FILE = TDTouchID/Info.plist;
298 | IPHONEOS_DEPLOYMENT_TARGET = 11.0;
299 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
300 | PRODUCT_BUNDLE_IDENTIFIER = com.tudou.TDTouchID.demo;
301 | PRODUCT_NAME = "$(TARGET_NAME)";
302 | };
303 | name = Release;
304 | };
305 | /* End XCBuildConfiguration section */
306 |
307 | /* Begin XCConfigurationList section */
308 | DBC98D7E1DE17CF600CBF7DE /* Build configuration list for PBXProject "TDTouchID" */ = {
309 | isa = XCConfigurationList;
310 | buildConfigurations = (
311 | DBC98D981DE17CF600CBF7DE /* Debug */,
312 | DBC98D991DE17CF600CBF7DE /* Release */,
313 | );
314 | defaultConfigurationIsVisible = 0;
315 | defaultConfigurationName = Release;
316 | };
317 | DBC98D9A1DE17CF600CBF7DE /* Build configuration list for PBXNativeTarget "TDTouchID" */ = {
318 | isa = XCConfigurationList;
319 | buildConfigurations = (
320 | DBC98D9B1DE17CF600CBF7DE /* Debug */,
321 | DBC98D9C1DE17CF600CBF7DE /* Release */,
322 | );
323 | defaultConfigurationIsVisible = 0;
324 | defaultConfigurationName = Release;
325 | };
326 | /* End XCConfigurationList section */
327 | };
328 | rootObject = DBC98D7B1DE17CF600CBF7DE /* Project object */;
329 | }
330 |
--------------------------------------------------------------------------------