iOS/Objective-C

Objective-C) 생체인증타입 확인

Brad_Heo 2024. 6. 21. 15:29

아래의 함수로 True 시 Face ID, False 시 지문으로 설정하면 된다.

#import "LocalAuthentication/LAContext.h"

- (BOOL)checkAuthType {
    LAContext *context = [[LAContext alloc] init];

    if (context.biometryType == LABiometryTypeFaceID) {
        return YES;
    } else {
        return NO;
    }
}

'iOS > Objective-C' 카테고리의 다른 글

Objective-C) 클래스 객체함수 호출하기  (0) 2024.06.20
Objective-C) 캡쳐방지  (0) 2024.06.19
Objective-C) Keyboard Layout 감지  (0) 2024.05.30
Objective-C) UIView 맨 앞으로 이동  (0) 2024.05.20