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;
    }
}