iOS에서 Touch ID 하는 코드이다 사용하기 간단하다.~!
NSString *loginDialogMessage = @"TouchID Login";
LAContext *context = [[LAContext alloc] init];
NSError *authError = nil;
if ([context canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&authError]) {
[context evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics
localizedReason:loginDialogMessage reply:^(BOOL success, NSError *error) {
if (success) {
NSLog(@"Success Login");
} else {
NSLog(@"%@",error);
}
}];
} else {
//TouchID Login 지원하지 않음
}
'Development > IOS & Mac' 카테고리의 다른 글
LLDB Quick Start Guide (0) | 2015.05.06 |
---|---|
Particle 효과 (CAEmitterLayer, CAEmitterCell) (0) | 2015.04.29 |
Xcode에서 ineligible device로 될떄.... (0) | 2015.04.09 |
ARC란.... (0) | 2015.03.03 |
'__curl_rule_01__' declared as an array with a negative size (0) | 2015.01.20 |