Fingerprint
Contents
FingerPrint 은 지문 인식 기능을 제공한다.
확장 프레임워크 파일을 추가하여 사용할 수 있으며 추가 방법은 iOS 개발 가이드 의 내용을 참조한다.
authenticate
지문 인증을 요청하는 기능이며 호출 방법은 다음과 같다.
Example
///////////////
// 3.10.18 이상
///////////////
let deviceAPI = DAPFingerPrint()
let infoParam = DAPFingerPrintAuthenticateParam()
infoParam.message = "Authenticate"
deviceAPI.execute(with: infoParam, completion: { (dict) in
guard let resultDict = dict as NSDictionary? else {
return
}
}, failure: { (resultError) in
guard let error = resultError else {
return
}
})
///////////////
// 3.10.18 이하
///////////////
let deviceAPI = DAPFingerPrint()
let params = ["Authenticate"]
deviceAPI.execute(withActionName: "authenticate", params: params, completion: { (dict) in
guard let resultDict = dict as NSDictionary? else {
return
}
}, failure: { (resultError) in
guard let error = resultError else {
return
}
})
// 3.10.18 이상
///////////////
let deviceAPI = DAPFingerPrint()
let infoParam = DAPFingerPrintAuthenticateParam()
infoParam.message = "Authenticate"
deviceAPI.execute(with: infoParam, completion: { (dict) in
guard let resultDict = dict as NSDictionary? else {
return
}
}, failure: { (resultError) in
guard let error = resultError else {
return
}
})
///////////////
// 3.10.18 이하
///////////////
let deviceAPI = DAPFingerPrint()
let params = ["Authenticate"]
deviceAPI.execute(withActionName: "authenticate", params: params, completion: { (dict) in
guard let resultDict = dict as NSDictionary? else {
return
}
}, failure: { (resultError) in
guard let error = resultError else {
return
}
})
///////////////
// 3.10.18 이상
///////////////
DAPFingerPrint *deviceAPI = [DAPFingerPrint new];
NSString *title = @"Authenticate";
[deviceAPI executeWithActionName:@"authenticate" params:[NSArray arrayWithObjects:title, nil] completion:^(NSDictionary *resultDict) {
} failure:^(NSError *error) {
}];
///////////////
// 3.10.18 이하
///////////////
DAPDeviceAPI *deviceAPI = [DAPFingerPrint new];
DAPFingerPrintAuthenticateParam *infoParam = [DAPFingerPrintAuthenticateParam new];
infoParam.message = @"Authenticate";
[deviceAPI executeWithParam:infoParam completion:^(NSDictionary *resultDict) {
NSString *result = NSLocalizedString(@"app_result_fail_authenticated", nil);
if ([[resultDict objectForKey:kDeviceResult] isEqualToString:@"1"] == YES) {
result = NSLocalizedString(@"app_result_success_authenticated", nil);
}
ResultData *resultData = [ResultData resultDataWithType:@"textResultDlg" resultObject:result];
[self showSuccessDlgWithResultData:resultData];
} failure:^(NSError *error) {
[self showErrorDlgWithError:error];
}];
// 3.10.18 이상
///////////////
DAPFingerPrint *deviceAPI = [DAPFingerPrint new];
NSString *title = @"Authenticate";
[deviceAPI executeWithActionName:@"authenticate" params:[NSArray arrayWithObjects:title, nil] completion:^(NSDictionary *resultDict) {
} failure:^(NSError *error) {
}];
///////////////
// 3.10.18 이하
///////////////
DAPDeviceAPI *deviceAPI = [DAPFingerPrint new];
DAPFingerPrintAuthenticateParam *infoParam = [DAPFingerPrintAuthenticateParam new];
infoParam.message = @"Authenticate";
[deviceAPI executeWithParam:infoParam completion:^(NSDictionary *resultDict) {
NSString *result = NSLocalizedString(@"app_result_fail_authenticated", nil);
if ([[resultDict objectForKey:kDeviceResult] isEqualToString:@"1"] == YES) {
result = NSLocalizedString(@"app_result_success_authenticated", nil);
}
ResultData *resultData = [ResultData resultDataWithType:@"textResultDlg" resultObject:result];
[self showSuccessDlgWithResultData:resultData];
} failure:^(NSError *error) {
[self showErrorDlgWithError:error];
}];