EMSystemBioFingerprintContainer
Objective-C
@interface EMSystemBioFingerprintContainer : NSObject
Swift
class EMSystemBioFingerprintContainer : NSObject
The biometric fingerprint authentication container.
Warning
Do not subclass this interface.Since
4.6-
Designated constructor. Returns the EMSystemBioFingerprintContainer object created using the EMSystemBioFingerprintAuthService
Since
4.6Declaration
Objective-C
+ (instancetype)containerWithBioFingerprintAuthService: (EMSystemBioFingerprintAuthService *)service;Swift
convenience init!(bioFingerprintAuthService service: EMSystemBioFingerprintAuthService!)Parameters
servicethe instance of EMSystemBioFingerprintAuthService
Return Value
instance of this class
-
Authenticate user by Touch ID with PIN fallback feature. By using this API, the application could customize the action upon error cases. The completion handler will return an EMSystemBioFingerprintAuthInput object and Touch ID evaluatedPolicyDomainState upon success. The EMSystemBioFingerprintAuthInput object can be used to generate OTPs.
Warning
PIN fallback feature only works on iOS9.0+. [error code] will contains EM_STATUS_AUTHENTICATION_USER_FALLBACK_IS_NOT_SUPPORTED if the application run it on unsupported OS.
Since
4.6
Declaration
Objective-C
- (void)authenticateUser:(id<EMAuthenticatable>)authenticatable withMessage:(NSString *)localizedMessage fallbackTitle:(NSString *)fallbackTitle completionHandler:(void (^)(id<EMSystemBioFingerprintAuthInput>, NSData *, NSError *))completionHandler;Swift
func authenticateUser(_ authenticatable: (any EMAuthenticatable)!, withMessage localizedMessage: String!, fallbackTitle: String!) async throws -> ((any EMSystemBioFingerprintAuthInput)?, Data?)Parameters
authenticatablethe target authenticatable item (e.g. CapToken)
localizedMessagethe message that will be displayed on Touch ID
fallbackTitlethe fallback title. If set to empty string, the button will be hidden.
completionHandlercompletion handler to be called with the result once it’s completed. Touch ID evaluatedPolicyDomainState data will be returned upon success. [error code] will contain EM_STATUS_AUTHENTICATION_CANCELED_USER_FALLBACK if user tapped the fallback button.
-
Cancel biometric fingerprint authentication prompt.
Since
5.0Declaration
Objective-C
- (void)cancelAuthentication;Swift
func cancelAuthentication()
EMSystemBioFingerprintContainer Class Reference