diff options
| author | Arjun Roychowdhury <pliablepixels@gmail.com> | 2015-10-31 08:21:38 -0400 |
|---|---|---|
| committer | Arjun Roychowdhury <pliablepixels@gmail.com> | 2015-10-31 08:21:38 -0400 |
| commit | 02811010cf62f1b21a06780d1e470d04bb24c50f (patch) | |
| tree | 0d933789068aac11c810ed4bb169d14ab16c43c6 /plugins/cordova-plugin-touchid/src/ios | |
| parent | bca561c1b3989d62a1fba829e0380c6fbf36caf5 (diff) | |
removed unecessary files from git
Diffstat (limited to 'plugins/cordova-plugin-touchid/src/ios')
| -rw-r--r-- | plugins/cordova-plugin-touchid/src/ios/TouchID.h | 13 | ||||
| -rw-r--r-- | plugins/cordova-plugin-touchid/src/ios/TouchID.m | 79 |
2 files changed, 0 insertions, 92 deletions
diff --git a/plugins/cordova-plugin-touchid/src/ios/TouchID.h b/plugins/cordova-plugin-touchid/src/ios/TouchID.h deleted file mode 100644 index d971a080..00000000 --- a/plugins/cordova-plugin-touchid/src/ios/TouchID.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// TouchID.h -// Copyright (c) 2014 Lee Crossley - http://ilee.co.uk -// - -#import <Cordova/CDVPlugin.h> - -@interface TouchID : CDVPlugin - -- (void) authenticate:(CDVInvokedUrlCommand*)command; -- (void) checkSupport:(CDVInvokedUrlCommand*)command; - -@end diff --git a/plugins/cordova-plugin-touchid/src/ios/TouchID.m b/plugins/cordova-plugin-touchid/src/ios/TouchID.m deleted file mode 100644 index 0d39f7e2..00000000 --- a/plugins/cordova-plugin-touchid/src/ios/TouchID.m +++ /dev/null @@ -1,79 +0,0 @@ -// -// TouchID.m -// Copyright (c) 2014 Lee Crossley - http://ilee.co.uk -// - -#import "TouchID.h" - -#import <LocalAuthentication/LocalAuthentication.h> - -@implementation TouchID - -- (void) authenticate:(CDVInvokedUrlCommand*)command; -{ - NSString *text = [command.arguments objectAtIndex:0]; - - __block CDVPluginResult* pluginResult = nil; - - if (NSClassFromString(@"LAContext") != nil) - { - LAContext *laContext = [[LAContext alloc] init]; - NSError *authError = nil; - - if ([laContext canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&authError]) - { - [laContext evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics localizedReason:text reply:^(BOOL success, NSError *error) - { - if (success) - { - pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; - } - else - { - pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:[error localizedDescription]]; - } - - [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; - }]; - } - else - { - pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:[authError localizedDescription]]; - [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; - } - } - else - { - pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR]; - [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; - } -} - -- (void) checkSupport:(CDVInvokedUrlCommand*)command; -{ - - __block CDVPluginResult* pluginResult = nil; - - if (NSClassFromString(@"LAContext") != nil) - { - LAContext *laContext = [[LAContext alloc] init]; - NSError *authError = nil; - - if ([laContext canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&authError]) - { - pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; - } - else - { - pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:[authError localizedDescription]]; - } - } - else - { - pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR]; - } - - [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; -} - -@end |
