├── .gitignore ├── .travis.yml ├── EVNTouchIDDemo.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── developer.xcuserdatad │ │ └── UserInterfaceState.xcuserstate ├── xcshareddata │ └── xcschemes │ │ └── EVNTouchIDDemo.xcscheme └── xcuserdata │ └── developer.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── todayWidget.xcscheme │ └── xcschememanagement.plist ├── EVNTouchIDDemo ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Info.plist ├── PrefixHeader.pch └── main.m ├── EVNTouchIDDemoTests ├── EVNTouchIDDemoTests.m └── Info.plist ├── LICENSE ├── README.md ├── ResourcesImage ├── DemoImage │ ├── 949086-1a291c4684c42ac3.png │ ├── 949086-dd8751e1eabc6521.png │ ├── Screen Shot 2016-10-18 at 15.18.27.png │ ├── Screen Shot 2016-10-18 at 15.18.39.png │ ├── Screen Shot 2016-10-18 at 15.18.56.png │ ├── Screen Shot 2016-10-18 at 15.19.55.png │ ├── Screen Shot 2016-10-18 at 15.20.06.png │ ├── Screen Shot 2016-10-18 at 15.20.38.png │ └── touchid.gif └── tabbarImage │ ├── CategoryViewSelect.png │ ├── CategoryViewUnSelect.png │ ├── HostViewSelect.png │ ├── HostViewUnSelect.png │ ├── MeViewSelect.png │ └── MeViewUnSelect.png ├── Tools ├── EVNHelper.h └── EVNHelper.m ├── ViewControllers ├── BaseViewController.h ├── BaseViewController.m ├── EVNTabBarController.h ├── EVNTabBarController.m ├── UserLoginTableViewController.h ├── UserLoginTableViewController.m ├── UserLoginViewController.h └── UserLoginViewController.m └── todayWidget ├── Base.lproj └── MainInterface.storyboard ├── Info.plist ├── TodayViewController.h ├── TodayViewController.m └── todayWidget.entitlements /.gitignore: -------------------------------------------------------------------------------- 1 | ## Build generated 2 | build/ 3 | DerivedData/ 4 | 5 | ## Various settings 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata/ 15 | *.xcuserstate 16 | 17 | ## Other 18 | *.moved-aside 19 | *.xccheckout 20 | *.xcscmblueprint 21 | *.moved-aside 22 | 23 | # Xcode 24 | .DS_Store 25 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | osx_image: xcode8.2 2 | language: objective-c 3 | xcode_workspace: ./EVNTouchIDDemo.xcodeproj 4 | xcode_schemes: EVNTouchIDDemo 5 | -------------------------------------------------------------------------------- /EVNTouchIDDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 8B1D11F61DB5F929000B6349 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B1D11F51DB5F929000B6349 /* main.m */; }; 11 | 8B1D11F91DB5F929000B6349 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B1D11F81DB5F929000B6349 /* AppDelegate.m */; }; 12 | 8B1D11FF1DB5F929000B6349 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8B1D11FD1DB5F929000B6349 /* Main.storyboard */; }; 13 | 8B1D12011DB5F929000B6349 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8B1D12001DB5F929000B6349 /* Assets.xcassets */; }; 14 | 8B1D12041DB5F929000B6349 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8B1D12021DB5F929000B6349 /* LaunchScreen.storyboard */; }; 15 | 8B1D120F1DB5F929000B6349 /* EVNTouchIDDemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B1D120E1DB5F929000B6349 /* EVNTouchIDDemoTests.m */; }; 16 | 8B1D12231DB5F963000B6349 /* README.md in Sources */ = {isa = PBXBuildFile; fileRef = 8B1D12191DB5F963000B6349 /* README.md */; }; 17 | 8B1D12241DB5F963000B6349 /* BaseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B1D121C1DB5F963000B6349 /* BaseViewController.m */; }; 18 | 8B1D12251DB5F963000B6349 /* EVNTabBarController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B1D121E1DB5F963000B6349 /* EVNTabBarController.m */; }; 19 | 8B1D12261DB5F963000B6349 /* UserLoginTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B1D12201DB5F963000B6349 /* UserLoginTableViewController.m */; }; 20 | 8B1D12271DB5F963000B6349 /* UserLoginViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B1D12221DB5F963000B6349 /* UserLoginViewController.m */; }; 21 | 8B1D123D1DB601F2000B6349 /* LocalAuthentication.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B1D123C1DB601F2000B6349 /* LocalAuthentication.framework */; }; 22 | 8B4E8AFC1DB605640080E96C /* Screen Shot 2016-10-18 at 15.18.27.png in Resources */ = {isa = PBXBuildFile; fileRef = 8B4E8AEF1DB605640080E96C /* Screen Shot 2016-10-18 at 15.18.27.png */; }; 23 | 8B4E8AFD1DB605640080E96C /* Screen Shot 2016-10-18 at 15.18.39.png in Resources */ = {isa = PBXBuildFile; fileRef = 8B4E8AF01DB605640080E96C /* Screen Shot 2016-10-18 at 15.18.39.png */; }; 24 | 8B4E8AFE1DB605640080E96C /* Screen Shot 2016-10-18 at 15.18.56.png in Resources */ = {isa = PBXBuildFile; fileRef = 8B4E8AF11DB605640080E96C /* Screen Shot 2016-10-18 at 15.18.56.png */; }; 25 | 8B4E8AFF1DB605640080E96C /* Screen Shot 2016-10-18 at 15.19.55.png in Resources */ = {isa = PBXBuildFile; fileRef = 8B4E8AF21DB605640080E96C /* Screen Shot 2016-10-18 at 15.19.55.png */; }; 26 | 8B4E8B001DB605640080E96C /* Screen Shot 2016-10-18 at 15.20.06.png in Resources */ = {isa = PBXBuildFile; fileRef = 8B4E8AF31DB605640080E96C /* Screen Shot 2016-10-18 at 15.20.06.png */; }; 27 | 8B4E8B011DB605640080E96C /* Screen Shot 2016-10-18 at 15.20.38.png in Resources */ = {isa = PBXBuildFile; fileRef = 8B4E8AF41DB605640080E96C /* Screen Shot 2016-10-18 at 15.20.38.png */; }; 28 | 8B4E8B021DB605640080E96C /* CategoryViewSelect.png in Resources */ = {isa = PBXBuildFile; fileRef = 8B4E8AF61DB605640080E96C /* CategoryViewSelect.png */; }; 29 | 8B4E8B031DB605640080E96C /* CategoryViewUnSelect.png in Resources */ = {isa = PBXBuildFile; fileRef = 8B4E8AF71DB605640080E96C /* CategoryViewUnSelect.png */; }; 30 | 8B4E8B041DB605640080E96C /* HostViewSelect.png in Resources */ = {isa = PBXBuildFile; fileRef = 8B4E8AF81DB605640080E96C /* HostViewSelect.png */; }; 31 | 8B4E8B051DB605640080E96C /* HostViewUnSelect.png in Resources */ = {isa = PBXBuildFile; fileRef = 8B4E8AF91DB605640080E96C /* HostViewUnSelect.png */; }; 32 | 8B4E8B061DB605640080E96C /* MeViewSelect.png in Resources */ = {isa = PBXBuildFile; fileRef = 8B4E8AFA1DB605640080E96C /* MeViewSelect.png */; }; 33 | 8B4E8B071DB605640080E96C /* MeViewUnSelect.png in Resources */ = {isa = PBXBuildFile; fileRef = 8B4E8AFB1DB605640080E96C /* MeViewUnSelect.png */; }; 34 | 8B4E8B0B1DB6133C0080E96C /* EVNHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B4E8B0A1DB6133C0080E96C /* EVNHelper.m */; }; 35 | 8B592CE11DB8B6510096DF14 /* NotificationCenter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B592CE01DB8B6510096DF14 /* NotificationCenter.framework */; }; 36 | 8B592CE51DB8B6510096DF14 /* TodayViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B592CE41DB8B6510096DF14 /* TodayViewController.m */; }; 37 | 8B592CEC1DB8B6520096DF14 /* todayWidget.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 8B592CDF1DB8B6510096DF14 /* todayWidget.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 38 | 8B592CF41DB8D2490096DF14 /* MainInterface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8B592CF21DB8D2490096DF14 /* MainInterface.storyboard */; }; 39 | 8B59CCAC1E4D6761007FC414 /* touchid.gif in Resources */ = {isa = PBXBuildFile; fileRef = 8B59CCAB1E4D6761007FC414 /* touchid.gif */; }; 40 | 8BA20C551DBB30BA004DC676 /* 949086-1a291c4684c42ac3.png in Resources */ = {isa = PBXBuildFile; fileRef = 8BA20C531DBB30BA004DC676 /* 949086-1a291c4684c42ac3.png */; }; 41 | 8BA20C561DBB30BA004DC676 /* 949086-dd8751e1eabc6521.png in Resources */ = {isa = PBXBuildFile; fileRef = 8BA20C541DBB30BA004DC676 /* 949086-dd8751e1eabc6521.png */; }; 42 | /* End PBXBuildFile section */ 43 | 44 | /* Begin PBXContainerItemProxy section */ 45 | 8B1D120B1DB5F929000B6349 /* PBXContainerItemProxy */ = { 46 | isa = PBXContainerItemProxy; 47 | containerPortal = 8B1D11E91DB5F929000B6349 /* Project object */; 48 | proxyType = 1; 49 | remoteGlobalIDString = 8B1D11F01DB5F929000B6349; 50 | remoteInfo = EVNTouchIDDemo; 51 | }; 52 | 8B592CEA1DB8B6520096DF14 /* PBXContainerItemProxy */ = { 53 | isa = PBXContainerItemProxy; 54 | containerPortal = 8B1D11E91DB5F929000B6349 /* Project object */; 55 | proxyType = 1; 56 | remoteGlobalIDString = 8B592CDE1DB8B6510096DF14; 57 | remoteInfo = todayWidget; 58 | }; 59 | /* End PBXContainerItemProxy section */ 60 | 61 | /* Begin PBXCopyFilesBuildPhase section */ 62 | 8B592CF01DB8B6520096DF14 /* Embed App Extensions */ = { 63 | isa = PBXCopyFilesBuildPhase; 64 | buildActionMask = 2147483647; 65 | dstPath = ""; 66 | dstSubfolderSpec = 13; 67 | files = ( 68 | 8B592CEC1DB8B6520096DF14 /* todayWidget.appex in Embed App Extensions */, 69 | ); 70 | name = "Embed App Extensions"; 71 | runOnlyForDeploymentPostprocessing = 0; 72 | }; 73 | /* End PBXCopyFilesBuildPhase section */ 74 | 75 | /* Begin PBXFileReference section */ 76 | 8B1D11F11DB5F929000B6349 /* EVNTouchIDDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = EVNTouchIDDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 77 | 8B1D11F51DB5F929000B6349 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 78 | 8B1D11F71DB5F929000B6349 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 79 | 8B1D11F81DB5F929000B6349 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 80 | 8B1D11FE1DB5F929000B6349 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 81 | 8B1D12001DB5F929000B6349 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 82 | 8B1D12031DB5F929000B6349 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 83 | 8B1D12051DB5F929000B6349 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 84 | 8B1D120A1DB5F929000B6349 /* EVNTouchIDDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = EVNTouchIDDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 85 | 8B1D120E1DB5F929000B6349 /* EVNTouchIDDemoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EVNTouchIDDemoTests.m; sourceTree = ""; }; 86 | 8B1D12101DB5F929000B6349 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 87 | 8B1D12191DB5F963000B6349 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 88 | 8B1D121B1DB5F963000B6349 /* BaseViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BaseViewController.h; sourceTree = ""; }; 89 | 8B1D121C1DB5F963000B6349 /* BaseViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BaseViewController.m; sourceTree = ""; }; 90 | 8B1D121D1DB5F963000B6349 /* EVNTabBarController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EVNTabBarController.h; sourceTree = ""; }; 91 | 8B1D121E1DB5F963000B6349 /* EVNTabBarController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EVNTabBarController.m; sourceTree = ""; }; 92 | 8B1D121F1DB5F963000B6349 /* UserLoginTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserLoginTableViewController.h; sourceTree = ""; }; 93 | 8B1D12201DB5F963000B6349 /* UserLoginTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UserLoginTableViewController.m; sourceTree = ""; }; 94 | 8B1D12211DB5F963000B6349 /* UserLoginViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserLoginViewController.h; sourceTree = ""; }; 95 | 8B1D12221DB5F963000B6349 /* UserLoginViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UserLoginViewController.m; sourceTree = ""; }; 96 | 8B1D123C1DB601F2000B6349 /* LocalAuthentication.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = LocalAuthentication.framework; path = System/Library/Frameworks/LocalAuthentication.framework; sourceTree = SDKROOT; }; 97 | 8B4E8AEF1DB605640080E96C /* Screen Shot 2016-10-18 at 15.18.27.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Screen Shot 2016-10-18 at 15.18.27.png"; sourceTree = ""; }; 98 | 8B4E8AF01DB605640080E96C /* Screen Shot 2016-10-18 at 15.18.39.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Screen Shot 2016-10-18 at 15.18.39.png"; sourceTree = ""; }; 99 | 8B4E8AF11DB605640080E96C /* Screen Shot 2016-10-18 at 15.18.56.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Screen Shot 2016-10-18 at 15.18.56.png"; sourceTree = ""; }; 100 | 8B4E8AF21DB605640080E96C /* Screen Shot 2016-10-18 at 15.19.55.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Screen Shot 2016-10-18 at 15.19.55.png"; sourceTree = ""; }; 101 | 8B4E8AF31DB605640080E96C /* Screen Shot 2016-10-18 at 15.20.06.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Screen Shot 2016-10-18 at 15.20.06.png"; sourceTree = ""; }; 102 | 8B4E8AF41DB605640080E96C /* Screen Shot 2016-10-18 at 15.20.38.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Screen Shot 2016-10-18 at 15.20.38.png"; sourceTree = ""; }; 103 | 8B4E8AF61DB605640080E96C /* CategoryViewSelect.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = CategoryViewSelect.png; sourceTree = ""; }; 104 | 8B4E8AF71DB605640080E96C /* CategoryViewUnSelect.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = CategoryViewUnSelect.png; sourceTree = ""; }; 105 | 8B4E8AF81DB605640080E96C /* HostViewSelect.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = HostViewSelect.png; sourceTree = ""; }; 106 | 8B4E8AF91DB605640080E96C /* HostViewUnSelect.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = HostViewUnSelect.png; sourceTree = ""; }; 107 | 8B4E8AFA1DB605640080E96C /* MeViewSelect.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = MeViewSelect.png; sourceTree = ""; }; 108 | 8B4E8AFB1DB605640080E96C /* MeViewUnSelect.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = MeViewUnSelect.png; sourceTree = ""; }; 109 | 8B4E8B091DB6133C0080E96C /* EVNHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EVNHelper.h; sourceTree = ""; }; 110 | 8B4E8B0A1DB6133C0080E96C /* EVNHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EVNHelper.m; sourceTree = ""; }; 111 | 8B4E8B0C1DB61E9D0080E96C /* PrefixHeader.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PrefixHeader.pch; sourceTree = ""; }; 112 | 8B592CDF1DB8B6510096DF14 /* todayWidget.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = todayWidget.appex; sourceTree = BUILT_PRODUCTS_DIR; }; 113 | 8B592CE01DB8B6510096DF14 /* NotificationCenter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = NotificationCenter.framework; path = System/Library/Frameworks/NotificationCenter.framework; sourceTree = SDKROOT; }; 114 | 8B592CE31DB8B6510096DF14 /* TodayViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TodayViewController.h; sourceTree = ""; }; 115 | 8B592CE41DB8B6510096DF14 /* TodayViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TodayViewController.m; sourceTree = ""; }; 116 | 8B592CE91DB8B6510096DF14 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 117 | 8B592CF11DB8B7220096DF14 /* todayWidget.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = todayWidget.entitlements; sourceTree = ""; }; 118 | 8B592CF31DB8D2490096DF14 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/MainInterface.storyboard; sourceTree = ""; }; 119 | 8B59CCAB1E4D6761007FC414 /* touchid.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = touchid.gif; sourceTree = ""; }; 120 | 8BA20C531DBB30BA004DC676 /* 949086-1a291c4684c42ac3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "949086-1a291c4684c42ac3.png"; sourceTree = ""; }; 121 | 8BA20C541DBB30BA004DC676 /* 949086-dd8751e1eabc6521.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "949086-dd8751e1eabc6521.png"; sourceTree = ""; }; 122 | /* End PBXFileReference section */ 123 | 124 | /* Begin PBXFrameworksBuildPhase section */ 125 | 8B1D11EE1DB5F929000B6349 /* Frameworks */ = { 126 | isa = PBXFrameworksBuildPhase; 127 | buildActionMask = 2147483647; 128 | files = ( 129 | 8B1D123D1DB601F2000B6349 /* LocalAuthentication.framework in Frameworks */, 130 | ); 131 | runOnlyForDeploymentPostprocessing = 0; 132 | }; 133 | 8B1D12071DB5F929000B6349 /* Frameworks */ = { 134 | isa = PBXFrameworksBuildPhase; 135 | buildActionMask = 2147483647; 136 | files = ( 137 | ); 138 | runOnlyForDeploymentPostprocessing = 0; 139 | }; 140 | 8B592CDC1DB8B6510096DF14 /* Frameworks */ = { 141 | isa = PBXFrameworksBuildPhase; 142 | buildActionMask = 2147483647; 143 | files = ( 144 | 8B592CE11DB8B6510096DF14 /* NotificationCenter.framework in Frameworks */, 145 | ); 146 | runOnlyForDeploymentPostprocessing = 0; 147 | }; 148 | /* End PBXFrameworksBuildPhase section */ 149 | 150 | /* Begin PBXGroup section */ 151 | 8B1D11E81DB5F929000B6349 = { 152 | isa = PBXGroup; 153 | children = ( 154 | 8B1D12191DB5F963000B6349 /* README.md */, 155 | 8B4E8B081DB613250080E96C /* Tools */, 156 | 8B4E8AED1DB605640080E96C /* ResourcesImage */, 157 | 8B1D121A1DB5F963000B6349 /* ViewControllers */, 158 | 8B1D11F31DB5F929000B6349 /* EVNTouchIDDemo */, 159 | 8B1D120D1DB5F929000B6349 /* EVNTouchIDDemoTests */, 160 | 8B592CE21DB8B6510096DF14 /* todayWidget */, 161 | 8B1D11F21DB5F929000B6349 /* Products */, 162 | 8B1D123B1DB601F2000B6349 /* Frameworks */, 163 | ); 164 | sourceTree = ""; 165 | }; 166 | 8B1D11F21DB5F929000B6349 /* Products */ = { 167 | isa = PBXGroup; 168 | children = ( 169 | 8B1D11F11DB5F929000B6349 /* EVNTouchIDDemo.app */, 170 | 8B1D120A1DB5F929000B6349 /* EVNTouchIDDemoTests.xctest */, 171 | 8B592CDF1DB8B6510096DF14 /* todayWidget.appex */, 172 | ); 173 | name = Products; 174 | sourceTree = ""; 175 | }; 176 | 8B1D11F31DB5F929000B6349 /* EVNTouchIDDemo */ = { 177 | isa = PBXGroup; 178 | children = ( 179 | 8B1D11F71DB5F929000B6349 /* AppDelegate.h */, 180 | 8B1D11F81DB5F929000B6349 /* AppDelegate.m */, 181 | 8B1D11FD1DB5F929000B6349 /* Main.storyboard */, 182 | 8B1D12001DB5F929000B6349 /* Assets.xcassets */, 183 | 8B1D12021DB5F929000B6349 /* LaunchScreen.storyboard */, 184 | 8B1D12051DB5F929000B6349 /* Info.plist */, 185 | 8B1D11F41DB5F929000B6349 /* Supporting Files */, 186 | 8B4E8B0C1DB61E9D0080E96C /* PrefixHeader.pch */, 187 | ); 188 | path = EVNTouchIDDemo; 189 | sourceTree = ""; 190 | }; 191 | 8B1D11F41DB5F929000B6349 /* Supporting Files */ = { 192 | isa = PBXGroup; 193 | children = ( 194 | 8B1D11F51DB5F929000B6349 /* main.m */, 195 | ); 196 | name = "Supporting Files"; 197 | sourceTree = ""; 198 | }; 199 | 8B1D120D1DB5F929000B6349 /* EVNTouchIDDemoTests */ = { 200 | isa = PBXGroup; 201 | children = ( 202 | 8B1D120E1DB5F929000B6349 /* EVNTouchIDDemoTests.m */, 203 | 8B1D12101DB5F929000B6349 /* Info.plist */, 204 | ); 205 | path = EVNTouchIDDemoTests; 206 | sourceTree = ""; 207 | }; 208 | 8B1D121A1DB5F963000B6349 /* ViewControllers */ = { 209 | isa = PBXGroup; 210 | children = ( 211 | 8B1D121B1DB5F963000B6349 /* BaseViewController.h */, 212 | 8B1D121C1DB5F963000B6349 /* BaseViewController.m */, 213 | 8B1D121D1DB5F963000B6349 /* EVNTabBarController.h */, 214 | 8B1D121E1DB5F963000B6349 /* EVNTabBarController.m */, 215 | 8B1D121F1DB5F963000B6349 /* UserLoginTableViewController.h */, 216 | 8B1D12201DB5F963000B6349 /* UserLoginTableViewController.m */, 217 | 8B1D12211DB5F963000B6349 /* UserLoginViewController.h */, 218 | 8B1D12221DB5F963000B6349 /* UserLoginViewController.m */, 219 | ); 220 | path = ViewControllers; 221 | sourceTree = ""; 222 | }; 223 | 8B1D123B1DB601F2000B6349 /* Frameworks */ = { 224 | isa = PBXGroup; 225 | children = ( 226 | 8B1D123C1DB601F2000B6349 /* LocalAuthentication.framework */, 227 | 8B592CE01DB8B6510096DF14 /* NotificationCenter.framework */, 228 | ); 229 | name = Frameworks; 230 | sourceTree = ""; 231 | }; 232 | 8B4E8AED1DB605640080E96C /* ResourcesImage */ = { 233 | isa = PBXGroup; 234 | children = ( 235 | 8B4E8AEE1DB605640080E96C /* DemoImage */, 236 | 8B4E8AF51DB605640080E96C /* tabbarImage */, 237 | ); 238 | path = ResourcesImage; 239 | sourceTree = ""; 240 | }; 241 | 8B4E8AEE1DB605640080E96C /* DemoImage */ = { 242 | isa = PBXGroup; 243 | children = ( 244 | 8B59CCAB1E4D6761007FC414 /* touchid.gif */, 245 | 8BA20C531DBB30BA004DC676 /* 949086-1a291c4684c42ac3.png */, 246 | 8BA20C541DBB30BA004DC676 /* 949086-dd8751e1eabc6521.png */, 247 | 8B4E8AEF1DB605640080E96C /* Screen Shot 2016-10-18 at 15.18.27.png */, 248 | 8B4E8AF01DB605640080E96C /* Screen Shot 2016-10-18 at 15.18.39.png */, 249 | 8B4E8AF11DB605640080E96C /* Screen Shot 2016-10-18 at 15.18.56.png */, 250 | 8B4E8AF21DB605640080E96C /* Screen Shot 2016-10-18 at 15.19.55.png */, 251 | 8B4E8AF31DB605640080E96C /* Screen Shot 2016-10-18 at 15.20.06.png */, 252 | 8B4E8AF41DB605640080E96C /* Screen Shot 2016-10-18 at 15.20.38.png */, 253 | ); 254 | path = DemoImage; 255 | sourceTree = ""; 256 | }; 257 | 8B4E8AF51DB605640080E96C /* tabbarImage */ = { 258 | isa = PBXGroup; 259 | children = ( 260 | 8B4E8AF61DB605640080E96C /* CategoryViewSelect.png */, 261 | 8B4E8AF71DB605640080E96C /* CategoryViewUnSelect.png */, 262 | 8B4E8AF81DB605640080E96C /* HostViewSelect.png */, 263 | 8B4E8AF91DB605640080E96C /* HostViewUnSelect.png */, 264 | 8B4E8AFA1DB605640080E96C /* MeViewSelect.png */, 265 | 8B4E8AFB1DB605640080E96C /* MeViewUnSelect.png */, 266 | ); 267 | path = tabbarImage; 268 | sourceTree = ""; 269 | }; 270 | 8B4E8B081DB613250080E96C /* Tools */ = { 271 | isa = PBXGroup; 272 | children = ( 273 | 8B4E8B091DB6133C0080E96C /* EVNHelper.h */, 274 | 8B4E8B0A1DB6133C0080E96C /* EVNHelper.m */, 275 | ); 276 | path = Tools; 277 | sourceTree = ""; 278 | }; 279 | 8B592CE21DB8B6510096DF14 /* todayWidget */ = { 280 | isa = PBXGroup; 281 | children = ( 282 | 8B592CF21DB8D2490096DF14 /* MainInterface.storyboard */, 283 | 8B592CF11DB8B7220096DF14 /* todayWidget.entitlements */, 284 | 8B592CE31DB8B6510096DF14 /* TodayViewController.h */, 285 | 8B592CE41DB8B6510096DF14 /* TodayViewController.m */, 286 | 8B592CE91DB8B6510096DF14 /* Info.plist */, 287 | ); 288 | path = todayWidget; 289 | sourceTree = ""; 290 | }; 291 | /* End PBXGroup section */ 292 | 293 | /* Begin PBXNativeTarget section */ 294 | 8B1D11F01DB5F929000B6349 /* EVNTouchIDDemo */ = { 295 | isa = PBXNativeTarget; 296 | buildConfigurationList = 8B1D12131DB5F929000B6349 /* Build configuration list for PBXNativeTarget "EVNTouchIDDemo" */; 297 | buildPhases = ( 298 | 8B1D11ED1DB5F929000B6349 /* Sources */, 299 | 8B1D11EE1DB5F929000B6349 /* Frameworks */, 300 | 8B1D11EF1DB5F929000B6349 /* Resources */, 301 | 8B592CF01DB8B6520096DF14 /* Embed App Extensions */, 302 | ); 303 | buildRules = ( 304 | ); 305 | dependencies = ( 306 | 8B592CEB1DB8B6520096DF14 /* PBXTargetDependency */, 307 | ); 308 | name = EVNTouchIDDemo; 309 | productName = EVNTouchIDDemo; 310 | productReference = 8B1D11F11DB5F929000B6349 /* EVNTouchIDDemo.app */; 311 | productType = "com.apple.product-type.application"; 312 | }; 313 | 8B1D12091DB5F929000B6349 /* EVNTouchIDDemoTests */ = { 314 | isa = PBXNativeTarget; 315 | buildConfigurationList = 8B1D12161DB5F929000B6349 /* Build configuration list for PBXNativeTarget "EVNTouchIDDemoTests" */; 316 | buildPhases = ( 317 | 8B1D12061DB5F929000B6349 /* Sources */, 318 | 8B1D12071DB5F929000B6349 /* Frameworks */, 319 | 8B1D12081DB5F929000B6349 /* Resources */, 320 | ); 321 | buildRules = ( 322 | ); 323 | dependencies = ( 324 | 8B1D120C1DB5F929000B6349 /* PBXTargetDependency */, 325 | ); 326 | name = EVNTouchIDDemoTests; 327 | productName = EVNTouchIDDemoTests; 328 | productReference = 8B1D120A1DB5F929000B6349 /* EVNTouchIDDemoTests.xctest */; 329 | productType = "com.apple.product-type.bundle.unit-test"; 330 | }; 331 | 8B592CDE1DB8B6510096DF14 /* todayWidget */ = { 332 | isa = PBXNativeTarget; 333 | buildConfigurationList = 8B592CEF1DB8B6520096DF14 /* Build configuration list for PBXNativeTarget "todayWidget" */; 334 | buildPhases = ( 335 | 8B592CDB1DB8B6510096DF14 /* Sources */, 336 | 8B592CDC1DB8B6510096DF14 /* Frameworks */, 337 | 8B592CDD1DB8B6510096DF14 /* Resources */, 338 | ); 339 | buildRules = ( 340 | ); 341 | dependencies = ( 342 | ); 343 | name = todayWidget; 344 | productName = todayWidget; 345 | productReference = 8B592CDF1DB8B6510096DF14 /* todayWidget.appex */; 346 | productType = "com.apple.product-type.app-extension"; 347 | }; 348 | /* End PBXNativeTarget section */ 349 | 350 | /* Begin PBXProject section */ 351 | 8B1D11E91DB5F929000B6349 /* Project object */ = { 352 | isa = PBXProject; 353 | attributes = { 354 | LastUpgradeCheck = 0800; 355 | ORGANIZATIONNAME = YUANDONG; 356 | TargetAttributes = { 357 | 8B1D11F01DB5F929000B6349 = { 358 | CreatedOnToolsVersion = 8.0; 359 | DevelopmentTeam = 2H6767RL8U; 360 | ProvisioningStyle = Automatic; 361 | }; 362 | 8B1D12091DB5F929000B6349 = { 363 | CreatedOnToolsVersion = 8.0; 364 | ProvisioningStyle = Automatic; 365 | TestTargetID = 8B1D11F01DB5F929000B6349; 366 | }; 367 | 8B592CDE1DB8B6510096DF14 = { 368 | CreatedOnToolsVersion = 8.0; 369 | DevelopmentTeam = 2H6767RL8U; 370 | ProvisioningStyle = Automatic; 371 | SystemCapabilities = { 372 | com.apple.ApplicationGroups.iOS = { 373 | enabled = 1; 374 | }; 375 | }; 376 | }; 377 | }; 378 | }; 379 | buildConfigurationList = 8B1D11EC1DB5F929000B6349 /* Build configuration list for PBXProject "EVNTouchIDDemo" */; 380 | compatibilityVersion = "Xcode 3.2"; 381 | developmentRegion = English; 382 | hasScannedForEncodings = 0; 383 | knownRegions = ( 384 | en, 385 | Base, 386 | ); 387 | mainGroup = 8B1D11E81DB5F929000B6349; 388 | productRefGroup = 8B1D11F21DB5F929000B6349 /* Products */; 389 | projectDirPath = ""; 390 | projectRoot = ""; 391 | targets = ( 392 | 8B1D11F01DB5F929000B6349 /* EVNTouchIDDemo */, 393 | 8B1D12091DB5F929000B6349 /* EVNTouchIDDemoTests */, 394 | 8B592CDE1DB8B6510096DF14 /* todayWidget */, 395 | ); 396 | }; 397 | /* End PBXProject section */ 398 | 399 | /* Begin PBXResourcesBuildPhase section */ 400 | 8B1D11EF1DB5F929000B6349 /* Resources */ = { 401 | isa = PBXResourcesBuildPhase; 402 | buildActionMask = 2147483647; 403 | files = ( 404 | 8B4E8B021DB605640080E96C /* CategoryViewSelect.png in Resources */, 405 | 8B59CCAC1E4D6761007FC414 /* touchid.gif in Resources */, 406 | 8BA20C561DBB30BA004DC676 /* 949086-dd8751e1eabc6521.png in Resources */, 407 | 8B4E8AFF1DB605640080E96C /* Screen Shot 2016-10-18 at 15.19.55.png in Resources */, 408 | 8B1D12041DB5F929000B6349 /* LaunchScreen.storyboard in Resources */, 409 | 8B4E8AFE1DB605640080E96C /* Screen Shot 2016-10-18 at 15.18.56.png in Resources */, 410 | 8B4E8B001DB605640080E96C /* Screen Shot 2016-10-18 at 15.20.06.png in Resources */, 411 | 8B4E8AFD1DB605640080E96C /* Screen Shot 2016-10-18 at 15.18.39.png in Resources */, 412 | 8BA20C551DBB30BA004DC676 /* 949086-1a291c4684c42ac3.png in Resources */, 413 | 8B4E8B011DB605640080E96C /* Screen Shot 2016-10-18 at 15.20.38.png in Resources */, 414 | 8B4E8AFC1DB605640080E96C /* Screen Shot 2016-10-18 at 15.18.27.png in Resources */, 415 | 8B1D12011DB5F929000B6349 /* Assets.xcassets in Resources */, 416 | 8B4E8B031DB605640080E96C /* CategoryViewUnSelect.png in Resources */, 417 | 8B4E8B051DB605640080E96C /* HostViewUnSelect.png in Resources */, 418 | 8B4E8B041DB605640080E96C /* HostViewSelect.png in Resources */, 419 | 8B4E8B061DB605640080E96C /* MeViewSelect.png in Resources */, 420 | 8B4E8B071DB605640080E96C /* MeViewUnSelect.png in Resources */, 421 | 8B1D11FF1DB5F929000B6349 /* Main.storyboard in Resources */, 422 | ); 423 | runOnlyForDeploymentPostprocessing = 0; 424 | }; 425 | 8B1D12081DB5F929000B6349 /* Resources */ = { 426 | isa = PBXResourcesBuildPhase; 427 | buildActionMask = 2147483647; 428 | files = ( 429 | ); 430 | runOnlyForDeploymentPostprocessing = 0; 431 | }; 432 | 8B592CDD1DB8B6510096DF14 /* Resources */ = { 433 | isa = PBXResourcesBuildPhase; 434 | buildActionMask = 2147483647; 435 | files = ( 436 | 8B592CF41DB8D2490096DF14 /* MainInterface.storyboard in Resources */, 437 | ); 438 | runOnlyForDeploymentPostprocessing = 0; 439 | }; 440 | /* End PBXResourcesBuildPhase section */ 441 | 442 | /* Begin PBXSourcesBuildPhase section */ 443 | 8B1D11ED1DB5F929000B6349 /* Sources */ = { 444 | isa = PBXSourcesBuildPhase; 445 | buildActionMask = 2147483647; 446 | files = ( 447 | 8B1D12251DB5F963000B6349 /* EVNTabBarController.m in Sources */, 448 | 8B1D12241DB5F963000B6349 /* BaseViewController.m in Sources */, 449 | 8B1D12271DB5F963000B6349 /* UserLoginViewController.m in Sources */, 450 | 8B1D11F91DB5F929000B6349 /* AppDelegate.m in Sources */, 451 | 8B1D12231DB5F963000B6349 /* README.md in Sources */, 452 | 8B1D11F61DB5F929000B6349 /* main.m in Sources */, 453 | 8B1D12261DB5F963000B6349 /* UserLoginTableViewController.m in Sources */, 454 | 8B4E8B0B1DB6133C0080E96C /* EVNHelper.m in Sources */, 455 | ); 456 | runOnlyForDeploymentPostprocessing = 0; 457 | }; 458 | 8B1D12061DB5F929000B6349 /* Sources */ = { 459 | isa = PBXSourcesBuildPhase; 460 | buildActionMask = 2147483647; 461 | files = ( 462 | 8B1D120F1DB5F929000B6349 /* EVNTouchIDDemoTests.m in Sources */, 463 | ); 464 | runOnlyForDeploymentPostprocessing = 0; 465 | }; 466 | 8B592CDB1DB8B6510096DF14 /* Sources */ = { 467 | isa = PBXSourcesBuildPhase; 468 | buildActionMask = 2147483647; 469 | files = ( 470 | 8B592CE51DB8B6510096DF14 /* TodayViewController.m in Sources */, 471 | ); 472 | runOnlyForDeploymentPostprocessing = 0; 473 | }; 474 | /* End PBXSourcesBuildPhase section */ 475 | 476 | /* Begin PBXTargetDependency section */ 477 | 8B1D120C1DB5F929000B6349 /* PBXTargetDependency */ = { 478 | isa = PBXTargetDependency; 479 | target = 8B1D11F01DB5F929000B6349 /* EVNTouchIDDemo */; 480 | targetProxy = 8B1D120B1DB5F929000B6349 /* PBXContainerItemProxy */; 481 | }; 482 | 8B592CEB1DB8B6520096DF14 /* PBXTargetDependency */ = { 483 | isa = PBXTargetDependency; 484 | target = 8B592CDE1DB8B6510096DF14 /* todayWidget */; 485 | targetProxy = 8B592CEA1DB8B6520096DF14 /* PBXContainerItemProxy */; 486 | }; 487 | /* End PBXTargetDependency section */ 488 | 489 | /* Begin PBXVariantGroup section */ 490 | 8B1D11FD1DB5F929000B6349 /* Main.storyboard */ = { 491 | isa = PBXVariantGroup; 492 | children = ( 493 | 8B1D11FE1DB5F929000B6349 /* Base */, 494 | ); 495 | name = Main.storyboard; 496 | sourceTree = ""; 497 | }; 498 | 8B1D12021DB5F929000B6349 /* LaunchScreen.storyboard */ = { 499 | isa = PBXVariantGroup; 500 | children = ( 501 | 8B1D12031DB5F929000B6349 /* Base */, 502 | ); 503 | name = LaunchScreen.storyboard; 504 | sourceTree = ""; 505 | }; 506 | 8B592CF21DB8D2490096DF14 /* MainInterface.storyboard */ = { 507 | isa = PBXVariantGroup; 508 | children = ( 509 | 8B592CF31DB8D2490096DF14 /* Base */, 510 | ); 511 | name = MainInterface.storyboard; 512 | sourceTree = ""; 513 | }; 514 | /* End PBXVariantGroup section */ 515 | 516 | /* Begin XCBuildConfiguration section */ 517 | 8B1D12111DB5F929000B6349 /* Debug */ = { 518 | isa = XCBuildConfiguration; 519 | buildSettings = { 520 | ALWAYS_SEARCH_USER_PATHS = NO; 521 | CLANG_ANALYZER_NONNULL = YES; 522 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 523 | CLANG_CXX_LIBRARY = "libc++"; 524 | CLANG_ENABLE_MODULES = YES; 525 | CLANG_ENABLE_OBJC_ARC = YES; 526 | CLANG_WARN_BOOL_CONVERSION = YES; 527 | CLANG_WARN_CONSTANT_CONVERSION = YES; 528 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 529 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 530 | CLANG_WARN_EMPTY_BODY = YES; 531 | CLANG_WARN_ENUM_CONVERSION = YES; 532 | CLANG_WARN_INFINITE_RECURSION = YES; 533 | CLANG_WARN_INT_CONVERSION = YES; 534 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 535 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 536 | CLANG_WARN_UNREACHABLE_CODE = YES; 537 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 538 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 539 | COPY_PHASE_STRIP = NO; 540 | DEBUG_INFORMATION_FORMAT = dwarf; 541 | ENABLE_STRICT_OBJC_MSGSEND = YES; 542 | ENABLE_TESTABILITY = YES; 543 | GCC_C_LANGUAGE_STANDARD = gnu99; 544 | GCC_DYNAMIC_NO_PIC = NO; 545 | GCC_NO_COMMON_BLOCKS = YES; 546 | GCC_OPTIMIZATION_LEVEL = 0; 547 | GCC_PREPROCESSOR_DEFINITIONS = ( 548 | "DEBUG=1", 549 | "$(inherited)", 550 | ); 551 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 552 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 553 | GCC_WARN_UNDECLARED_SELECTOR = YES; 554 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 555 | GCC_WARN_UNUSED_FUNCTION = YES; 556 | GCC_WARN_UNUSED_VARIABLE = YES; 557 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 558 | MTL_ENABLE_DEBUG_INFO = YES; 559 | ONLY_ACTIVE_ARCH = YES; 560 | SDKROOT = iphoneos; 561 | }; 562 | name = Debug; 563 | }; 564 | 8B1D12121DB5F929000B6349 /* Release */ = { 565 | isa = XCBuildConfiguration; 566 | buildSettings = { 567 | ALWAYS_SEARCH_USER_PATHS = NO; 568 | CLANG_ANALYZER_NONNULL = YES; 569 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 570 | CLANG_CXX_LIBRARY = "libc++"; 571 | CLANG_ENABLE_MODULES = YES; 572 | CLANG_ENABLE_OBJC_ARC = YES; 573 | CLANG_WARN_BOOL_CONVERSION = YES; 574 | CLANG_WARN_CONSTANT_CONVERSION = YES; 575 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 576 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 577 | CLANG_WARN_EMPTY_BODY = YES; 578 | CLANG_WARN_ENUM_CONVERSION = YES; 579 | CLANG_WARN_INFINITE_RECURSION = YES; 580 | CLANG_WARN_INT_CONVERSION = YES; 581 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 582 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 583 | CLANG_WARN_UNREACHABLE_CODE = YES; 584 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 585 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 586 | COPY_PHASE_STRIP = NO; 587 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 588 | ENABLE_NS_ASSERTIONS = NO; 589 | ENABLE_STRICT_OBJC_MSGSEND = YES; 590 | GCC_C_LANGUAGE_STANDARD = gnu99; 591 | GCC_NO_COMMON_BLOCKS = YES; 592 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 593 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 594 | GCC_WARN_UNDECLARED_SELECTOR = YES; 595 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 596 | GCC_WARN_UNUSED_FUNCTION = YES; 597 | GCC_WARN_UNUSED_VARIABLE = YES; 598 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 599 | MTL_ENABLE_DEBUG_INFO = NO; 600 | SDKROOT = iphoneos; 601 | VALIDATE_PRODUCT = YES; 602 | }; 603 | name = Release; 604 | }; 605 | 8B1D12141DB5F929000B6349 /* Debug */ = { 606 | isa = XCBuildConfiguration; 607 | buildSettings = { 608 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 609 | DEVELOPMENT_TEAM = 2H6767RL8U; 610 | GCC_PREFIX_HEADER = EVNTouchIDDemo/PrefixHeader.pch; 611 | INFOPLIST_FILE = EVNTouchIDDemo/Info.plist; 612 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 613 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 614 | PRODUCT_BUNDLE_IDENTIFIER = asdfasd.EVNTouchIDDemo; 615 | PRODUCT_NAME = "$(TARGET_NAME)"; 616 | }; 617 | name = Debug; 618 | }; 619 | 8B1D12151DB5F929000B6349 /* Release */ = { 620 | isa = XCBuildConfiguration; 621 | buildSettings = { 622 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 623 | DEVELOPMENT_TEAM = 2H6767RL8U; 624 | GCC_PREFIX_HEADER = EVNTouchIDDemo/PrefixHeader.pch; 625 | INFOPLIST_FILE = EVNTouchIDDemo/Info.plist; 626 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 627 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 628 | PRODUCT_BUNDLE_IDENTIFIER = asdfasd.EVNTouchIDDemo; 629 | PRODUCT_NAME = "$(TARGET_NAME)"; 630 | }; 631 | name = Release; 632 | }; 633 | 8B1D12171DB5F929000B6349 /* Debug */ = { 634 | isa = XCBuildConfiguration; 635 | buildSettings = { 636 | BUNDLE_LOADER = "$(TEST_HOST)"; 637 | INFOPLIST_FILE = EVNTouchIDDemoTests/Info.plist; 638 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 639 | PRODUCT_BUNDLE_IDENTIFIER = asdfasd.EVNTouchIDDemoTests; 640 | PRODUCT_NAME = "$(TARGET_NAME)"; 641 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/EVNTouchIDDemo.app/EVNTouchIDDemo"; 642 | }; 643 | name = Debug; 644 | }; 645 | 8B1D12181DB5F929000B6349 /* Release */ = { 646 | isa = XCBuildConfiguration; 647 | buildSettings = { 648 | BUNDLE_LOADER = "$(TEST_HOST)"; 649 | INFOPLIST_FILE = EVNTouchIDDemoTests/Info.plist; 650 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 651 | PRODUCT_BUNDLE_IDENTIFIER = asdfasd.EVNTouchIDDemoTests; 652 | PRODUCT_NAME = "$(TARGET_NAME)"; 653 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/EVNTouchIDDemo.app/EVNTouchIDDemo"; 654 | }; 655 | name = Release; 656 | }; 657 | 8B592CED1DB8B6520096DF14 /* Debug */ = { 658 | isa = XCBuildConfiguration; 659 | buildSettings = { 660 | CODE_SIGN_ENTITLEMENTS = todayWidget/todayWidget.entitlements; 661 | DEVELOPMENT_TEAM = 2H6767RL8U; 662 | INFOPLIST_FILE = todayWidget/Info.plist; 663 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 664 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; 665 | PRODUCT_BUNDLE_IDENTIFIER = asdfasd.EVNTouchIDDemo.todayWidget; 666 | PRODUCT_NAME = "$(TARGET_NAME)"; 667 | SKIP_INSTALL = YES; 668 | }; 669 | name = Debug; 670 | }; 671 | 8B592CEE1DB8B6520096DF14 /* Release */ = { 672 | isa = XCBuildConfiguration; 673 | buildSettings = { 674 | CODE_SIGN_ENTITLEMENTS = todayWidget/todayWidget.entitlements; 675 | DEVELOPMENT_TEAM = 2H6767RL8U; 676 | INFOPLIST_FILE = todayWidget/Info.plist; 677 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 678 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; 679 | PRODUCT_BUNDLE_IDENTIFIER = asdfasd.EVNTouchIDDemo.todayWidget; 680 | PRODUCT_NAME = "$(TARGET_NAME)"; 681 | SKIP_INSTALL = YES; 682 | }; 683 | name = Release; 684 | }; 685 | /* End XCBuildConfiguration section */ 686 | 687 | /* Begin XCConfigurationList section */ 688 | 8B1D11EC1DB5F929000B6349 /* Build configuration list for PBXProject "EVNTouchIDDemo" */ = { 689 | isa = XCConfigurationList; 690 | buildConfigurations = ( 691 | 8B1D12111DB5F929000B6349 /* Debug */, 692 | 8B1D12121DB5F929000B6349 /* Release */, 693 | ); 694 | defaultConfigurationIsVisible = 0; 695 | defaultConfigurationName = Release; 696 | }; 697 | 8B1D12131DB5F929000B6349 /* Build configuration list for PBXNativeTarget "EVNTouchIDDemo" */ = { 698 | isa = XCConfigurationList; 699 | buildConfigurations = ( 700 | 8B1D12141DB5F929000B6349 /* Debug */, 701 | 8B1D12151DB5F929000B6349 /* Release */, 702 | ); 703 | defaultConfigurationIsVisible = 0; 704 | defaultConfigurationName = Release; 705 | }; 706 | 8B1D12161DB5F929000B6349 /* Build configuration list for PBXNativeTarget "EVNTouchIDDemoTests" */ = { 707 | isa = XCConfigurationList; 708 | buildConfigurations = ( 709 | 8B1D12171DB5F929000B6349 /* Debug */, 710 | 8B1D12181DB5F929000B6349 /* Release */, 711 | ); 712 | defaultConfigurationIsVisible = 0; 713 | defaultConfigurationName = Release; 714 | }; 715 | 8B592CEF1DB8B6520096DF14 /* Build configuration list for PBXNativeTarget "todayWidget" */ = { 716 | isa = XCConfigurationList; 717 | buildConfigurations = ( 718 | 8B592CED1DB8B6520096DF14 /* Debug */, 719 | 8B592CEE1DB8B6520096DF14 /* Release */, 720 | ); 721 | defaultConfigurationIsVisible = 0; 722 | defaultConfigurationName = Release; 723 | }; 724 | /* End XCConfigurationList section */ 725 | }; 726 | rootObject = 8B1D11E91DB5F929000B6349 /* Project object */; 727 | } 728 | -------------------------------------------------------------------------------- /EVNTouchIDDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /EVNTouchIDDemo.xcodeproj/project.xcworkspace/xcuserdata/developer.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zonghongyan/EVNTouchIDDemo/0947fc0b858e5354f0d7f9a779625c77a43a9fba/EVNTouchIDDemo.xcodeproj/project.xcworkspace/xcuserdata/developer.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /EVNTouchIDDemo.xcodeproj/xcshareddata/xcschemes/EVNTouchIDDemo.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 66 | 72 | 73 | 74 | 75 | 79 | 80 | 81 | 82 | 83 | 84 | 90 | 92 | 98 | 99 | 100 | 101 | 103 | 104 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /EVNTouchIDDemo.xcodeproj/xcuserdata/developer.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /EVNTouchIDDemo.xcodeproj/xcuserdata/developer.xcuserdatad/xcschemes/todayWidget.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 6 | 9 | 10 | 16 | 22 | 23 | 24 | 30 | 36 | 37 | 38 | 39 | 40 | 45 | 46 | 47 | 48 | 54 | 55 | 56 | 57 | 58 | 59 | 70 | 72 | 78 | 79 | 80 | 81 | 82 | 83 | 90 | 92 | 98 | 99 | 100 | 101 | 103 | 104 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /EVNTouchIDDemo.xcodeproj/xcuserdata/developer.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | EVNTouchIDDemo.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | todayWidget.xcscheme 13 | 14 | orderHint 15 | 1 16 | 17 | 18 | SuppressBuildableAutocreation 19 | 20 | 8B1D11F01DB5F929000B6349 21 | 22 | primary 23 | 24 | 25 | 8B1D12091DB5F929000B6349 26 | 27 | primary 28 | 29 | 30 | 8B592CDE1DB8B6510096DF14 31 | 32 | primary 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /EVNTouchIDDemo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // EVNTouchIDDemo 4 | // 5 | // Created by developer on 2016/10/18. 6 | // Copyright © 2016年 YUANDONG. 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 | * 作者: 仁伯安 19 | * 作者GitHub链接: https://github.com/zonghongyan 20 | * 作者简书链接:http://www.jianshu.com/users/ac49bc773ff9 21 | * 著作权归作者所有,转载请联系作者获得授权,并标注“作者”。 22 | ************************************************************************/ 23 | -------------------------------------------------------------------------------- /EVNTouchIDDemo/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // EVNTouchIDDemo 4 | // 5 | // Created by developer on 2016/10/18. 6 | // Copyright © 2016年 YUANDONG. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 19 | { 20 | // Override point for customization after application launch. 21 | 22 | 23 | return YES; 24 | } 25 | 26 | 27 | - (void)applicationWillResignActive:(UIApplication *)application { 28 | // 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. 29 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 30 | } 31 | 32 | 33 | - (void)applicationDidEnterBackground:(UIApplication *)application { 34 | // 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. 35 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 36 | } 37 | 38 | 39 | - (void)applicationWillEnterForeground:(UIApplication *)application { 40 | // 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. 41 | } 42 | 43 | 44 | - (void)applicationDidBecomeActive:(UIApplication *)application { 45 | // 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. 46 | } 47 | 48 | 49 | - (void)applicationWillTerminate:(UIApplication *)application { 50 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 51 | } 52 | 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /EVNTouchIDDemo/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /EVNTouchIDDemo/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 | -------------------------------------------------------------------------------- /EVNTouchIDDemo/Base.lproj/Main.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 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 202 | 209 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 242 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | -------------------------------------------------------------------------------- /EVNTouchIDDemo/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 | CFBundleURLTypes 20 | 21 | 22 | CFBundleTypeRole 23 | Editor 24 | CFBundleURLName 25 | asdfasd.EVNTouchIDDemo.todayWidget 26 | CFBundleURLSchemes 27 | 28 | todayWidget 29 | 30 | 31 | 32 | CFBundleVersion 33 | 1 34 | LSRequiresIPhoneOS 35 | 36 | UILaunchStoryboardName 37 | LaunchScreen 38 | UIMainStoryboardFile 39 | Main 40 | UIRequiredDeviceCapabilities 41 | 42 | armv7 43 | 44 | UISupportedInterfaceOrientations 45 | 46 | UIInterfaceOrientationPortrait 47 | UIInterfaceOrientationLandscapeLeft 48 | UIInterfaceOrientationLandscapeRight 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /EVNTouchIDDemo/PrefixHeader.pch: -------------------------------------------------------------------------------- 1 | // 2 | // PrefixHeader.pch 3 | // EVNTouchIDDemo 4 | // 5 | // Created by developer on 2016/10/18. 6 | // Copyright © 2016年 YUANDONG. All rights reserved. 7 | // 8 | 9 | #ifndef PrefixHeader_pch 10 | #define PrefixHeader_pch 11 | 12 | // 用来处理Xcode8下iOS10日志信息输出问题 13 | #ifdef DEBUG 14 | #define NSLog(format, ...) printf("[%s] %s [%d line] %s\n", __TIME__, __FUNCTION__, __LINE__, [[NSString stringWithFormat:format, ## __VA_ARGS__] UTF8String]) 15 | 16 | #else 17 | #define NSLog(format, ...) 18 | #endif 19 | 20 | //#define groupID 21 | 22 | #endif /* PrefixHeader_pch */ 23 | -------------------------------------------------------------------------------- /EVNTouchIDDemo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // EVNTouchIDDemo 4 | // 5 | // Created by developer on 2016/10/18. 6 | // Copyright © 2016年 YUANDONG. 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 | -------------------------------------------------------------------------------- /EVNTouchIDDemoTests/EVNTouchIDDemoTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // EVNTouchIDDemoTests.m 3 | // EVNTouchIDDemoTests 4 | // 5 | // Created by developer on 2016/10/18. 6 | // Copyright © 2016年 YUANDONG. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface EVNTouchIDDemoTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation EVNTouchIDDemoTests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | } 21 | 22 | - (void)tearDown { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | [super tearDown]; 25 | } 26 | 27 | - (void)testExample { 28 | // This is an example of a functional test case. 29 | // Use XCTAssert and related functions to verify your tests produce the correct results. 30 | } 31 | 32 | - (void)testPerformanceExample { 33 | // This is an example of a performance test case. 34 | [self measureBlock:^{ 35 | // Put the code you want to measure the time of here. 36 | }]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /EVNTouchIDDemoTests/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 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 仁伯安 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### EVNTouchIDDemo 2 | 3 | [![Build Status](https://travis-ci.org/zonghongyan/EVNTouchIDDemo.svg?branch=master)](https://travis-ci.org/zonghongyan/EVNTouchIDDemo) 4 | [![License](https://img.shields.io/github/license/zonghongyan/EVNTouchIDDemo.svg?style=flat)](https://github.com/zonghongyan/EVNTouchIDDemo/blob/master/LICENSE) 5 | 6 | [iOS指纹识别登录流程及实现](http://www.jianshu.com/p/67fd93408517) 7 | 8 | 9 | Show the figure 10 | 11 | Show the figure 12 | Show the figure 13 | 14 | 15 | ``` 16 | /** 17 | * Login fingerprint verification 18 | */ 19 | - (void)loadAuthentication 20 | { 21 | LAContext *myContext = [[LAContext alloc] init]; 22 | // This property is set fingerprint input after the failure of pop-up option 23 | myContext.localizedFallbackTitle = @"Forgot password"; 24 | 25 | NSError *authError = nil; 26 | NSString *myLocalizedReasonString = @"Please hold the Home button to complete the verification"; 27 | // MARK: Whether the equipment support fingerprint identification 28 | if ([myContext canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&authError]) 29 | { 30 | [myContext evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics localizedReason:myLocalizedReasonString reply:^(BOOL success, NSError * _Nullable error) { 31 | if(success) 32 | { 33 | NSLog(@"Fingerprint authentication success"); 34 | } 35 | else 36 | { 37 | NSLog(@"Fingerprint authentication failed,%@",error.description); 38 | 39 | NSLog(@"%ld", (long)error.code); // error.code 40 | switch (error.code) 41 | { 42 | case LAErrorAuthenticationFailed: // Authentication was not successful, because user failed to provide valid credentials 43 | { 44 | NSLog(@"Authorization failure"); // -1 Fingerprint identification error three times in a row 45 | } 46 | break; 47 | case LAErrorUserCancel: // Authentication was canceled by user (e.g. tapped Cancel button) 48 | { 49 | NSLog(@"用户取消验证Touch ID"); // -2 在TouchID对话框中点击了取消按钮 50 | 51 | } 52 | break; 53 | case LAErrorUserFallback: // Authentication was canceled, because the user tapped the fallback button (Enter Password) 54 | { 55 | [[NSOperationQueue mainQueue] addOperationWithBlock:^{ 56 | NSLog(@"用户选择输入密码,切换主线程处理"); // -3 在TouchID对话框中点击了输入密码按钮 57 | }]; 58 | 59 | } 60 | break; 61 | case LAErrorSystemCancel: // Authentication was canceled by system (e.g. another application went to foreground) 62 | { 63 | NSLog(@"取消授权,如其他应用切入,用户自主"); // -4 TouchID对话框被系统取消,例如按下Home或者电源键 64 | } 65 | break; 66 | case LAErrorPasscodeNotSet: // Authentication could not start, because passcode is not set on the device. 67 | 68 | { 69 | NSLog(@"设备系统未设置密码"); // -5 70 | } 71 | break; 72 | case LAErrorTouchIDNotAvailable: // Authentication could not start, because Touch ID is not available on the device 73 | { 74 | NSLog(@"设备未设置Touch ID"); // -6 75 | } 76 | break; 77 | case LAErrorTouchIDNotEnrolled: // Authentication could not start, because Touch ID has no enrolled fingers 78 | { 79 | NSLog(@"用户未录入指纹"); // -7 80 | } 81 | break; 82 | 83 | #if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_9_0 84 | case LAErrorTouchIDLockout: //Authentication was not successful, because there were too many failed Touch ID attempts and Touch ID is now locked. Passcode is required to unlock Touch ID, e.g. evaluating LAPolicyDeviceOwnerAuthenticationWithBiometrics will ask for passcode as a prerequisite 用户连续多次进行Touch ID验证失败,Touch ID被锁,需要用户输入密码解锁,先Touch ID验证密码 85 | { 86 | NSLog(@"Touch ID被锁,需要用户输入密码解锁"); // -8 连续五次指纹识别错误,TouchID功能被锁定,下一次需要输入系统密码 87 | } 88 | break; 89 | case LAErrorAppCancel: // Authentication was canceled by application (e.g. invalidate was called while authentication was in progress) 如突然来了电话,电话应用进入前台,APP被挂起啦"); 90 | { 91 | NSLog(@"用户不能控制情况下APP被挂起"); // -9 92 | } 93 | break; 94 | case LAErrorInvalidContext: // LAContext passed to this call has been previously invalidated. 95 | { 96 | NSLog(@"LAContext传递给这个调用之前已经失效"); // -10 97 | } 98 | break; 99 | #else 100 | #endif 101 | default: 102 | { 103 | [[NSOperationQueue mainQueue] addOperationWithBlock:^{ 104 | NSLog(@"其他情况,切换主线程处理"); 105 | }]; 106 | break; 107 | } 108 | } 109 | } 110 | }]; 111 | } 112 | else 113 | { 114 | NSLog(@"设备不支持指纹"); 115 | NSLog(@"%ld", (long)authError.code); 116 | switch (authError.code) 117 | { 118 | case LAErrorTouchIDNotEnrolled: 119 | { 120 | NSLog(@"Authentication could not start, because Touch ID has no enrolled fingers"); 121 | break; 122 | } 123 | case LAErrorPasscodeNotSet: 124 | { 125 | NSLog(@"Authentication could not start, because passcode is not set on the device"); 126 | break; 127 | } 128 | default: 129 | { 130 | NSLog(@"TouchID not available"); 131 | break; 132 | } 133 | } 134 | } 135 | } 136 | 137 | ``` 138 | -------------------------------------------------------------------------------- /ResourcesImage/DemoImage/949086-1a291c4684c42ac3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zonghongyan/EVNTouchIDDemo/0947fc0b858e5354f0d7f9a779625c77a43a9fba/ResourcesImage/DemoImage/949086-1a291c4684c42ac3.png -------------------------------------------------------------------------------- /ResourcesImage/DemoImage/949086-dd8751e1eabc6521.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zonghongyan/EVNTouchIDDemo/0947fc0b858e5354f0d7f9a779625c77a43a9fba/ResourcesImage/DemoImage/949086-dd8751e1eabc6521.png -------------------------------------------------------------------------------- /ResourcesImage/DemoImage/Screen Shot 2016-10-18 at 15.18.27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zonghongyan/EVNTouchIDDemo/0947fc0b858e5354f0d7f9a779625c77a43a9fba/ResourcesImage/DemoImage/Screen Shot 2016-10-18 at 15.18.27.png -------------------------------------------------------------------------------- /ResourcesImage/DemoImage/Screen Shot 2016-10-18 at 15.18.39.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zonghongyan/EVNTouchIDDemo/0947fc0b858e5354f0d7f9a779625c77a43a9fba/ResourcesImage/DemoImage/Screen Shot 2016-10-18 at 15.18.39.png -------------------------------------------------------------------------------- /ResourcesImage/DemoImage/Screen Shot 2016-10-18 at 15.18.56.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zonghongyan/EVNTouchIDDemo/0947fc0b858e5354f0d7f9a779625c77a43a9fba/ResourcesImage/DemoImage/Screen Shot 2016-10-18 at 15.18.56.png -------------------------------------------------------------------------------- /ResourcesImage/DemoImage/Screen Shot 2016-10-18 at 15.19.55.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zonghongyan/EVNTouchIDDemo/0947fc0b858e5354f0d7f9a779625c77a43a9fba/ResourcesImage/DemoImage/Screen Shot 2016-10-18 at 15.19.55.png -------------------------------------------------------------------------------- /ResourcesImage/DemoImage/Screen Shot 2016-10-18 at 15.20.06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zonghongyan/EVNTouchIDDemo/0947fc0b858e5354f0d7f9a779625c77a43a9fba/ResourcesImage/DemoImage/Screen Shot 2016-10-18 at 15.20.06.png -------------------------------------------------------------------------------- /ResourcesImage/DemoImage/Screen Shot 2016-10-18 at 15.20.38.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zonghongyan/EVNTouchIDDemo/0947fc0b858e5354f0d7f9a779625c77a43a9fba/ResourcesImage/DemoImage/Screen Shot 2016-10-18 at 15.20.38.png -------------------------------------------------------------------------------- /ResourcesImage/DemoImage/touchid.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zonghongyan/EVNTouchIDDemo/0947fc0b858e5354f0d7f9a779625c77a43a9fba/ResourcesImage/DemoImage/touchid.gif -------------------------------------------------------------------------------- /ResourcesImage/tabbarImage/CategoryViewSelect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zonghongyan/EVNTouchIDDemo/0947fc0b858e5354f0d7f9a779625c77a43a9fba/ResourcesImage/tabbarImage/CategoryViewSelect.png -------------------------------------------------------------------------------- /ResourcesImage/tabbarImage/CategoryViewUnSelect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zonghongyan/EVNTouchIDDemo/0947fc0b858e5354f0d7f9a779625c77a43a9fba/ResourcesImage/tabbarImage/CategoryViewUnSelect.png -------------------------------------------------------------------------------- /ResourcesImage/tabbarImage/HostViewSelect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zonghongyan/EVNTouchIDDemo/0947fc0b858e5354f0d7f9a779625c77a43a9fba/ResourcesImage/tabbarImage/HostViewSelect.png -------------------------------------------------------------------------------- /ResourcesImage/tabbarImage/HostViewUnSelect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zonghongyan/EVNTouchIDDemo/0947fc0b858e5354f0d7f9a779625c77a43a9fba/ResourcesImage/tabbarImage/HostViewUnSelect.png -------------------------------------------------------------------------------- /ResourcesImage/tabbarImage/MeViewSelect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zonghongyan/EVNTouchIDDemo/0947fc0b858e5354f0d7f9a779625c77a43a9fba/ResourcesImage/tabbarImage/MeViewSelect.png -------------------------------------------------------------------------------- /ResourcesImage/tabbarImage/MeViewUnSelect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zonghongyan/EVNTouchIDDemo/0947fc0b858e5354f0d7f9a779625c77a43a9fba/ResourcesImage/tabbarImage/MeViewUnSelect.png -------------------------------------------------------------------------------- /Tools/EVNHelper.h: -------------------------------------------------------------------------------- 1 | // 2 | // EVNHelper.h 3 | // EVNTouchIDDemo 4 | // 5 | // Created by developer on 2016/10/18. 6 | // Copyright © 2016年 YUANDONG. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface EVNHelper : NSObject 12 | 13 | @property (assign, nonatomic) BOOL isAppCurrentLoginState; 14 | 15 | + (instancetype)shareHelper; 16 | 17 | @end 18 | /************************************************************************ 19 | * 作者: 仁伯安 20 | * 作者GitHub链接: https://github.com/zonghongyan 21 | * 作者简书链接:http://www.jianshu.com/users/ac49bc773ff9 22 | * 著作权归作者所有,转载请联系作者获得授权,并标注“作者”。 23 | ************************************************************************/ 24 | -------------------------------------------------------------------------------- /Tools/EVNHelper.m: -------------------------------------------------------------------------------- 1 | // 2 | // EVNHelper.m 3 | // EVNTouchIDDemo 4 | // 5 | // Created by developer on 2016/10/18. 6 | // Copyright © 2016年 YUANDONG. All rights reserved. 7 | // 8 | 9 | #import "EVNHelper.h" 10 | 11 | static id _instance; 12 | 13 | @implementation EVNHelper 14 | 15 | /** 16 | * 只要系统中引用了该类,程序运行,就会主动调用load(不用手动调用,而且只会加载1次) 17 | */ 18 | + (void)load 19 | { 20 | _instance = [[EVNHelper alloc] init]; //[[self alloc] init]; 21 | } 22 | 23 | + (instancetype)allocWithZone:(struct _NSZone *)zone 24 | { 25 | static dispatch_once_t onceToken; 26 | dispatch_once(&onceToken, ^{ 27 | _instance = [super allocWithZone:zone]; 28 | }); 29 | return _instance; 30 | } 31 | + (instancetype)shareHelper 32 | { 33 | static dispatch_once_t onceToken; 34 | dispatch_once(&onceToken, ^{ 35 | _instance = [[self alloc] init]; 36 | }); 37 | return _instance; 38 | } 39 | - (id)copyWithZone:(NSZone *)zone 40 | { 41 | return _instance; 42 | } 43 | - (id)mutableCopyWithZone:(NSZone *)zone 44 | { 45 | return _instance; 46 | } 47 | 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /ViewControllers/BaseViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // BaseViewController.h 3 | // EVNTouchIDDemo 4 | // 5 | // Created by developer on 2016/10/17. 6 | // Copyright © 2016年 仁伯安. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface BaseViewController : UIViewController 12 | 13 | @end 14 | /************************************************************************ 15 | * 作者: 仁伯安 16 | * 作者GitHub链接: https://github.com/zonghongyan 17 | * 作者简书链接:http://www.jianshu.com/users/ac49bc773ff9 18 | * 著作权归作者所有,转载请联系作者获得授权,并标注“作者”。 19 | ************************************************************************/ 20 | -------------------------------------------------------------------------------- /ViewControllers/BaseViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // BaseViewController.m 3 | // EVNTouchIDDemo 4 | // 5 | // Created by developer on 2016/10/17. 6 | // Copyright © 2016年 仁伯安. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface BaseViewController () 12 | 13 | @end 14 | 15 | @implementation BaseViewController 16 | 17 | - (void)viewDidLoad 18 | { 19 | [super viewDidLoad]; 20 | // Do any additional setup after loading the view. 21 | 22 | UIBarButtonItem *back = [[UIBarButtonItem alloc] initWithTitle:@"" style:0 target:self action:@selector(back:)]; 23 | [back setTitle:@""]; 24 | [self.navigationController.navigationBar setTintColor:[UIColor whiteColor]]; 25 | self.navigationItem.backBarButtonItem = back; 26 | } 27 | 28 | - (void)didReceiveMemoryWarning 29 | { 30 | [super didReceiveMemoryWarning]; 31 | // Dispose of any resources that can be recreated. 32 | } 33 | 34 | - (void) back:(UIBarButtonItem *) sender 35 | { 36 | [self.navigationController popViewControllerAnimated:YES]; 37 | } 38 | 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /ViewControllers/EVNTabBarController.h: -------------------------------------------------------------------------------- 1 | // 2 | // EVNTabBarController.h 3 | // EVNTouchIDDemo 4 | // 5 | // Created by developer on 2016/10/17. 6 | // Copyright © 2016年 仁伯安. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface EVNTabBarController : UITabBarController 12 | 13 | @end 14 | /************************************************************************ 15 | * 作者: 仁伯安 16 | * 作者GitHub链接: https://github.com/zonghongyan 17 | * 作者简书链接:http://www.jianshu.com/users/ac49bc773ff9 18 | * 著作权归作者所有,转载请联系作者获得授权,并标注“作者”。 19 | ************************************************************************/ 20 | -------------------------------------------------------------------------------- /ViewControllers/EVNTabBarController.m: -------------------------------------------------------------------------------- 1 | // 2 | // EVNTabBarController.m 3 | // EVNTouchIDDemo 4 | // 5 | // Created by developer on 2016/10/17. 6 | // Copyright © 2016年 仁伯安. All rights reserved. 7 | // 8 | 9 | #import "EVNTabBarController.h" 10 | 11 | @interface EVNTabBarController () 12 | 13 | @end 14 | 15 | @implementation EVNTabBarController 16 | 17 | - (void)viewDidLoad 18 | { 19 | [super viewDidLoad]; 20 | 21 | [self initCustomBar]; 22 | 23 | [[UITabBar appearance] setBackgroundColor:[UIColor whiteColor]]; // tabbar背景 24 | [[UITabBar appearance] setTintColor:[UIColor redColor]]; // 标题字 25 | [[UITabBar appearance] setBarTintColor:[UIColor whiteColor]]; // 颜色 26 | } 27 | 28 | - (void)didReceiveMemoryWarning { 29 | [super didReceiveMemoryWarning]; 30 | // Dispose of any resources that can be recreated. 31 | } 32 | 33 | #pragma mark - 初始化 34 | - (void)initCustomBar 35 | { 36 | UIImage *selecthomeImg = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"HostViewSelect" ofType:@"png"]]; 37 | UIImage *unSelecthomeImg = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"HostViewUnSelect" ofType:@"png"]]; 38 | UINavigationController *hostNavVC = [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"hostNavVC"]; 39 | hostNavVC.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"首页" image:[self scaleImage:unSelecthomeImg] selectedImage:[self scaleImage:selecthomeImg]]; 40 | hostNavVC.tabBarItem.tag = 0; 41 | 42 | 43 | 44 | UIImage *selectOtherImg = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"CategoryViewSelect" ofType:@"png"]]; 45 | UIImage *unSelectOtherImg = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"CategoryViewUnSelect" ofType:@"png"]]; 46 | UINavigationController *otherNavVC = [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"otherNav"]; 47 | otherNavVC.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"其他" image:[self scaleImage:unSelectOtherImg] selectedImage:[self scaleImage:selectOtherImg]]; 48 | otherNavVC.tabBarItem.tag = 1; 49 | 50 | UIImage *imViewSelectImg = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"MeViewSelect" ofType:@"png"]]; 51 | UIImage *imViewUnSelectImg = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"MeViewUnSelect" ofType:@"png"]]; 52 | UINavigationController *mineSBNavVC = [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"mineNavVC"]; 53 | mineSBNavVC.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"我" image:[self scaleImage:imViewUnSelectImg] selectedImage:[self scaleImage:imViewSelectImg]]; 54 | mineSBNavVC.tabBarItem.tag = 2; 55 | 56 | self.viewControllers = @[hostNavVC, otherNavVC, mineSBNavVC]; 57 | } 58 | 59 | - (UIImage *)scaleImage:(UIImage *)image 60 | { 61 | return [UIImage imageWithCGImage:image.CGImage scale:1.5 orientation:image.imageOrientation]; 62 | } 63 | 64 | 65 | @end 66 | -------------------------------------------------------------------------------- /ViewControllers/UserLoginTableViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UserLoginTableViewController.h 3 | // EVNTouchIDDemo 4 | // 5 | // Created by developer on 2016/10/17. 6 | // Copyright © 2016年 仁伯安. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UserLoginTableViewController : UITableViewController 12 | 13 | @end 14 | /************************************************************************ 15 | * 作者: 仁伯安 16 | * 作者GitHub链接: https://github.com/zonghongyan 17 | * 作者简书链接:http://www.jianshu.com/users/ac49bc773ff9 18 | * 著作权归作者所有,转载请联系作者获得授权,并标注“作者”。 19 | ************************************************************************/ 20 | -------------------------------------------------------------------------------- /ViewControllers/UserLoginTableViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // UserLoginTableViewController.m 3 | // EVNTouchIDDemo 4 | // 5 | // Created by developer on 2016/10/17. 6 | // Copyright © 2016年 仁伯安. All rights reserved. 7 | // 8 | 9 | #import "UserLoginTableViewController.h" 10 | #import "UserLoginViewController.h" 11 | #import 12 | #import "EVNHelper.h" 13 | 14 | @interface UserLoginTableViewController () 15 | { 16 | 17 | } 18 | 19 | @property (weak, nonatomic) IBOutlet UIButton *logoutBtnAction; 20 | 21 | @property (weak, nonatomic) IBOutlet UISwitch *isAutoLogin; 22 | 23 | @property (weak, nonatomic) IBOutlet UILabel *userInfo; 24 | 25 | @property (strong, nonatomic) EVNHelper *helper; 26 | 27 | @end 28 | 29 | @implementation UserLoginTableViewController 30 | { 31 | } 32 | - (void)viewDidLoad 33 | { 34 | [super viewDidLoad]; 35 | self.helper = [EVNHelper shareHelper]; 36 | self.logoutBtnAction.hidden = YES; // 初始化时候就是未登录状态 37 | 38 | LAContext *context = [[LAContext alloc] init]; // 初始化上下文对象 39 | NSError *error = nil; 40 | // 判断设备是否支持指纹识别功能 41 | if (![context canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&error]) 42 | { 43 | // 设备不支持,隐藏掉指纹登录cell,Demo不再实现 44 | } 45 | } 46 | 47 | - (void)didReceiveMemoryWarning { 48 | [super didReceiveMemoryWarning]; 49 | // Dispose of any resources that can be recreated. 50 | } 51 | 52 | #pragma mark - Table view data source 53 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView 54 | { 55 | return 2; 56 | } 57 | 58 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 59 | { 60 | return 3; 61 | } 62 | 63 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 64 | { 65 | if (indexPath.section == 0) 66 | { 67 | NSNumber *isStartAutoLoginState = [[NSUserDefaults standardUserDefaults] objectForKey:@"startAutoLoginState"]; 68 | NSNumber *isLoginState = [[NSUserDefaults standardUserDefaults] objectForKey:@"loginState"]; 69 | 70 | if (indexPath.row == 0 && [isLoginState boolValue] && [isStartAutoLoginState boolValue] && !_helper.isAppCurrentLoginState) // 如果用户登录过且为登录状态,而且开启指纹登录 71 | { 72 | UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"验证登录" message:@"是否使用指纹登录" preferredStyle:UIAlertControllerStyleAlert]; 73 | 74 | UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"更换账号" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) { 75 | 76 | [self commonLogin]; // 普通登录 77 | 78 | }]; 79 | UIAlertAction *startUseAction = [UIAlertAction actionWithTitle:@"指纹登录" style:UIAlertActionStyleDestructive handler:^(UIAlertAction * _Nonnull action) { 80 | [self loadAuthentication]; 81 | 82 | }]; 83 | [alertController addAction:cancelAction]; 84 | [alertController addAction:startUseAction]; 85 | [self presentViewController:alertController animated:YES completion:nil]; 86 | } 87 | else if (indexPath.row == 0 && !_helper.isAppCurrentLoginState) 88 | { 89 | [self commonLogin]; // 普通登录 90 | } 91 | else 92 | { 93 | // 其他的cell事件 94 | } 95 | } 96 | else 97 | { 98 | // 其他的cell事件 99 | } 100 | } 101 | 102 | /** 103 | * 退出登录按钮 104 | * @param sender button 105 | */ 106 | - (IBAction)logoutBtnAction:(UIButton *)sender 107 | { 108 | [[NSUserDefaults standardUserDefaults] setObject:@NO forKey:@"loginState"]; 109 | self.userInfo.text = @"用户登录"; 110 | sender.hidden = YES; 111 | 112 | _helper.isAppCurrentLoginState = NO; 113 | } 114 | 115 | /** 116 | * 开启指纹登录Switch 117 | * @param sender switch控件 118 | */ 119 | - (IBAction)autoLoginAction:(UISwitch *)sender 120 | { 121 | if ([self loginState]) 122 | { 123 | [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithBool:sender.on] forKey:@"startAutoLoginState"]; 124 | } 125 | else 126 | { 127 | [self commonLogin]; 128 | } 129 | } 130 | 131 | /** 132 | * 判断登录状态 133 | * @return 是否登录 134 | */ 135 | - (BOOL)loginState 136 | { 137 | NSNumber *isLoginState = [[NSUserDefaults standardUserDefaults] objectForKey:@"loginState"]; 138 | 139 | if ([isLoginState boolValue] && _helper.isAppCurrentLoginState) 140 | { 141 | return YES; 142 | } 143 | return NO; 144 | } 145 | 146 | /** 147 | * 普通登录 148 | */ 149 | - (void)commonLogin 150 | { 151 | UserLoginViewController *userLoginViewController = [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"userLoginViewController"]; 152 | 153 | __weak typeof(self) weakSelf = self; 154 | userLoginViewController.transLoginStateBlock = ^(){ 155 | // 回调状态 156 | weakSelf.logoutBtnAction.hidden = NO; 157 | NSNumber *isStartAutoLoginState = [[NSUserDefaults standardUserDefaults] objectForKey:@"startAutoLoginState"]; 158 | weakSelf.isAutoLogin.on = [isStartAutoLoginState boolValue]; 159 | 160 | weakSelf.userInfo.text = @"仁伯安"; 161 | }; 162 | [self presentViewController:userLoginViewController animated:YES completion:nil]; 163 | } 164 | 165 | /** 166 | * 指纹登录验证 167 | */ 168 | - (void)loadAuthentication 169 | { 170 | __weak typeof(self) weakSelf = self; 171 | 172 | LAContext *myContext = [[LAContext alloc] init]; 173 | // 这个属性是设置指纹输入失败之后的弹出框的选项 174 | myContext.localizedFallbackTitle = @"忘记密码"; 175 | 176 | NSError *authError = nil; 177 | NSString *myLocalizedReasonString = @"请按住Home键完成验证"; 178 | // MARK: 判断设备是否支持指纹识别 179 | if ([myContext canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&authError]) 180 | { 181 | [myContext evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics localizedReason:myLocalizedReasonString reply:^(BOOL success, NSError * _Nullable error) { 182 | if(success) 183 | { 184 | NSLog(@"指纹认证成功"); 185 | 186 | weakSelf.helper.isAppCurrentLoginState = YES; 187 | 188 | weakSelf.logoutBtnAction.hidden = NO; 189 | weakSelf.userInfo.text = @"仁伯安"; 190 | } 191 | else 192 | { 193 | weakSelf.helper.isAppCurrentLoginState = NO; 194 | NSLog(@"指纹认证失败,%@",error.description); 195 | 196 | NSLog(@"%ld", (long)error.code); // 错误码 error.code 197 | switch (error.code) 198 | { 199 | case LAErrorAuthenticationFailed: // Authentication was not successful, because user failed to provide valid credentials 200 | { 201 | NSLog(@"授权失败"); // -1 连续三次指纹识别错误 202 | } 203 | break; 204 | case LAErrorUserCancel: // Authentication was canceled by user (e.g. tapped Cancel button) 205 | { 206 | NSLog(@"用户取消验证Touch ID"); // -2 在TouchID对话框中点击了取消按钮 207 | 208 | } 209 | break; 210 | case LAErrorUserFallback: // Authentication was canceled, because the user tapped the fallback button (Enter Password) 211 | { 212 | [[NSOperationQueue mainQueue] addOperationWithBlock:^{ 213 | NSLog(@"用户选择输入密码,切换主线程处理"); // -3 在TouchID对话框中点击了输入密码按钮 214 | }]; 215 | 216 | } 217 | break; 218 | case LAErrorSystemCancel: // Authentication was canceled by system (e.g. another application went to foreground) 219 | { 220 | NSLog(@"取消授权,如其他应用切入,用户自主"); // -4 TouchID对话框被系统取消,例如按下Home或者电源键 221 | } 222 | break; 223 | case LAErrorPasscodeNotSet: // Authentication could not start, because passcode is not set on the device. 224 | 225 | { 226 | NSLog(@"设备系统未设置密码"); // -5 227 | } 228 | break; 229 | case LAErrorTouchIDNotAvailable: // Authentication could not start, because Touch ID is not available on the device 230 | { 231 | NSLog(@"设备未设置Touch ID"); // -6 232 | } 233 | break; 234 | case LAErrorTouchIDNotEnrolled: // Authentication could not start, because Touch ID has no enrolled fingers 235 | { 236 | NSLog(@"用户未录入指纹"); // -7 237 | } 238 | break; 239 | 240 | #if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_9_0 241 | case LAErrorTouchIDLockout: //Authentication was not successful, because there were too many failed Touch ID attempts and Touch ID is now locked. Passcode is required to unlock Touch ID, e.g. evaluating LAPolicyDeviceOwnerAuthenticationWithBiometrics will ask for passcode as a prerequisite 用户连续多次进行Touch ID验证失败,Touch ID被锁,需要用户输入密码解锁,先Touch ID验证密码 242 | { 243 | NSLog(@"Touch ID被锁,需要用户输入密码解锁"); // -8 连续五次指纹识别错误,TouchID功能被锁定,下一次需要输入系统密码 244 | } 245 | break; 246 | case LAErrorAppCancel: // Authentication was canceled by application (e.g. invalidate was called while authentication was in progress) 如突然来了电话,电话应用进入前台,APP被挂起啦"); 247 | { 248 | NSLog(@"用户不能控制情况下APP被挂起"); // -9 249 | } 250 | break; 251 | case LAErrorInvalidContext: // LAContext passed to this call has been previously invalidated. 252 | { 253 | NSLog(@"LAContext传递给这个调用之前已经失效"); // -10 254 | } 255 | break; 256 | #else 257 | #endif 258 | default: 259 | { 260 | [[NSOperationQueue mainQueue] addOperationWithBlock:^{ 261 | NSLog(@"其他情况,切换主线程处理"); 262 | }]; 263 | break; 264 | } 265 | } 266 | } 267 | }]; 268 | } 269 | else 270 | { 271 | NSLog(@"设备不支持指纹"); 272 | NSLog(@"%ld", (long)authError.code); 273 | weakSelf.helper.isAppCurrentLoginState = NO; 274 | switch (authError.code) 275 | { 276 | case LAErrorTouchIDNotEnrolled: 277 | { 278 | NSLog(@"Authentication could not start, because Touch ID has no enrolled fingers"); 279 | break; 280 | } 281 | case LAErrorPasscodeNotSet: 282 | { 283 | NSLog(@"Authentication could not start, because passcode is not set on the device"); 284 | break; 285 | } 286 | default: 287 | { 288 | NSLog(@"TouchID not available"); 289 | break; 290 | } 291 | } 292 | } 293 | } 294 | 295 | 296 | @end 297 | -------------------------------------------------------------------------------- /ViewControllers/UserLoginViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UserLoginViewController.h 3 | // EVNTouchIDDemo 4 | // 5 | // Created by developer on 2016/10/17. 6 | // Copyright © 2016年 仁伯安. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | typedef void(^TransLoginStateBlock)(); 12 | 13 | @interface UserLoginViewController : BaseViewController 14 | 15 | @property (copy, nonatomic) TransLoginStateBlock transLoginStateBlock; 16 | 17 | @end 18 | /************************************************************************ 19 | * 作者: 仁伯安 20 | * 作者GitHub链接: https://github.com/zonghongyan 21 | * 作者简书链接:http://www.jianshu.com/users/ac49bc773ff9 22 | * 著作权归作者所有,转载请联系作者获得授权,并标注“作者”。 23 | ************************************************************************/ 24 | -------------------------------------------------------------------------------- /ViewControllers/UserLoginViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // UserLoginViewController.m 3 | // EVNTouchIDDemo 4 | // 5 | // Created by developer on 2016/10/17. 6 | // Copyright © 2016年 仁伯安. All rights reserved. 7 | // 8 | 9 | #import "UserLoginViewController.h" 10 | #import "EVNHelper.h" 11 | #import 12 | 13 | @interface UserLoginViewController () 14 | 15 | @property (weak, nonatomic) IBOutlet UIButton *backBtn; 16 | 17 | @end 18 | 19 | @implementation UserLoginViewController 20 | 21 | - (void)viewDidLoad 22 | { 23 | [super viewDidLoad]; 24 | 25 | 26 | UIBarButtonItem *lefttem = [[UIBarButtonItem alloc] initWithCustomView:_backBtn]; 27 | self.navigationItem.leftBarButtonItem = lefttem; 28 | } 29 | 30 | - (void)didReceiveMemoryWarning 31 | { 32 | [super didReceiveMemoryWarning]; 33 | // Dispose of any resources that can be recreated. 34 | } 35 | 36 | - (IBAction)backBtnAction:(UIButton *)sender 37 | { 38 | [self dismissViewControllerAnimated:YES completion:nil]; 39 | } 40 | 41 | 42 | - (IBAction)loginBtnAction:(UIButton *)sender 43 | { 44 | 45 | [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithBool:YES] forKey:@"loginState"]; 46 | 47 | EVNHelper *helper = [EVNHelper shareHelper]; 48 | helper.isAppCurrentLoginState = YES; 49 | 50 | LAContext *context = [[LAContext alloc] init]; // 初始化上下文对象 51 | NSError *error = nil; 52 | // 判断设备是否支持指纹识别功能 53 | if ([context canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&error]) 54 | { 55 | // 支持指纹验证 56 | UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"登录成功!" message:@"是否启用指纹登录" preferredStyle:UIAlertControllerStyleAlert]; 57 | 58 | __weak typeof (self) weakSelf = self; 59 | 60 | UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"稍后" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) { 61 | 62 | [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithBool:NO] forKey:@"startAutoLoginState"]; 63 | weakSelf.transLoginStateBlock(); // 回传 64 | [self dismissViewControllerAnimated:YES completion:nil]; 65 | }]; 66 | 67 | UIAlertAction *startUseAction = [UIAlertAction actionWithTitle:@"启用" style:UIAlertActionStyleDestructive handler:^(UIAlertAction * _Nonnull action) { 68 | 69 | [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithBool:YES] forKey:@"startAutoLoginState"]; 70 | weakSelf.transLoginStateBlock(); // 回传 71 | [self dismissViewControllerAnimated:YES completion:nil]; 72 | 73 | }]; 74 | [alertController addAction:cancelAction]; 75 | [alertController addAction:startUseAction]; 76 | 77 | [self presentViewController:alertController animated:YES completion:nil]; 78 | } 79 | else 80 | { 81 | [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithBool:NO] forKey:@"startAutoLoginState"]; 82 | self.transLoginStateBlock(); // 回传 83 | [self dismissViewControllerAnimated:YES completion:nil]; 84 | } 85 | 86 | } 87 | 88 | 89 | @end 90 | -------------------------------------------------------------------------------- /todayWidget/Base.lproj/MainInterface.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 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /todayWidget/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | 买卖宝 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | XPC! 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | NSExtension 24 | 25 | NSExtensionMainStoryboard 26 | MainInterface 27 | NSExtensionPointIdentifier 28 | com.apple.widget-extension 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /todayWidget/TodayViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // TodayViewController.h 3 | // todayWidget 4 | // 5 | // Created by developer on 2016/10/20. 6 | // Copyright © 2016年 YUANDONG. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface TodayViewController : UIViewController 12 | @property (weak, nonatomic) IBOutlet UIButton *goApp; 13 | 14 | 15 | @end 16 | /************************************************************************ 17 | * 作者: 仁伯安 18 | * 作者GitHub链接: https://github.com/zonghongyan 19 | * 作者简书链接:http://www.jianshu.com/users/ac49bc773ff9 20 | * 著作权归作者所有,转载请联系作者获得授权,并标注“作者”。 21 | ************************************************************************/ 22 | -------------------------------------------------------------------------------- /todayWidget/TodayViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // TodayViewController.m 3 | // todayWidget 4 | // 5 | // Created by developer on 2016/10/20. 6 | // Copyright © 2016年 YUANDONG. All rights reserved. 7 | // 8 | 9 | #import "TodayViewController.h" 10 | #import 11 | 12 | @interface TodayViewController () 13 | 14 | @end 15 | 16 | @implementation TodayViewController 17 | 18 | - (void)viewDidLoad 19 | { 20 | [super viewDidLoad]; 21 | // Do any additional setup after loading the view from its nib. 22 | 23 | } 24 | 25 | - (void)didReceiveMemoryWarning { 26 | [super didReceiveMemoryWarning]; 27 | // Dispose of any resources that can be recreated. 28 | } 29 | 30 | - (void)widgetPerformUpdateWithCompletionHandler:(void (^)(NCUpdateResult))completionHandler { 31 | // Perform any setup necessary in order to update the view. 32 | 33 | // If an error is encountered, use NCUpdateResultFailed 34 | // If there's no update required, use NCUpdateResultNoData 35 | // If there's an update, use NCUpdateResultNewData 36 | 37 | completionHandler(NCUpdateResultNewData); 38 | } 39 | 40 | 41 | - (IBAction)goAppAction:(UIButton *)sender 42 | { 43 | [self.extensionContext openURL:[NSURL URLWithString:@"todayWidget://"] completionHandler:^(BOOL success) { 44 | NSLog(@"open url result:%d",success); 45 | }]; 46 | } 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /todayWidget/todayWidget.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.application-groups 6 | 7 | group.asdfasd.EVNTouchIDDemo 8 | 9 | 10 | 11 | --------------------------------------------------------------------------------