Skip to content

Instantly share code, notes, and snippets.

View tacryt-socryp's full-sized avatar
🌊

tacryt-socryp tacryt-socryp

🌊
View GitHub Profile
@tacryt-socryp
tacryt-socryp / touchID
Last active July 28, 2017 18:07 — forked from jstart/touchID
Touch ID Example
LAContext *myContext = [[LAContext alloc] init];
NSError *authError = nil;
if ([myContext canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&authError]) {
[myContext evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics
localizedReason:@"Authenticate to access secure information"
reply:^(BOOL success, NSError *error) {
if (success) {
NSLog(@"User is authenticated successfully");
} else {
NSLog(@"Authentication Fails");