Platforms to show: All Mac Windows Linux Cross-Platform
LAContextMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | TouchBar | MBS Mac64bit Plugin | 17.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
- event evaluatePolicyResult(Success as Boolean, error as NSErrorMBS, Policy as Integer, localizedReason as String, tag as Variant)
- 8 properties
- property biometryType as Integer
- property evaluatedPolicyDomainState as MemoryBlock
- property Handle as Integer
- property interactionNotAllowed as Boolean
- property localizedCancelTitle as String
- property localizedFallbackTitle as String
- property localizedReason as String
- property touchIDAuthenticationAllowableReuseDuration as Double
- 6 methods
- method canEvaluatePolicy(Policy as Integer, byref Error as NSErrorMBS) as Boolean
- method Constructor
- method evaluatePolicy(Policy as Integer, localizedReason as String, Tag as Variant = nil)
- method invalidate
- method isCredentialSet(CredentialType as Integer) as Boolean
- method setCredential(credential as MemoryBlock, Type as Integer) as Boolean
- 2 shared methods
- shared method Available as Boolean
- shared method TouchIDAuthenticationMaximumAllowableReuseDuration as Double
- 23 constants
Constants
Constant | Value | Description |
---|---|---|
kLAErrorDomain | "com.apple.LocalAuthentication" | The error domain for Local Authentication. |
Biometry Types
Constant | Value | Description |
---|---|---|
BiometryTypeFaceID | 2 |
The device supports Face ID. |
BiometryTypeNone | 0 |
The device does not support biometry. |
BiometryTypeTouchID | 1 |
The device supports Touch ID. |
Credential Types
Constant | Value | Description |
---|---|---|
CredentialTypeApplicationPassword | 0 |
The credential type for an application password. |
CredentialTypeSmartCardPIN | 1 | Smart card PIN provided by application. more |
Error Codes
Constant | Value | Description |
---|---|---|
kErrorAppCancel | -9 |
Authentication was canceled by application (e.g. invalidate was called while authentication was in progress). |
kErrorAuthenticationFailed | -1 |
Authentication was not successful, because user failed to provide valid credentials. |
kErrorBiometryLockout | -8 |
Authentication was not successful, because there were too many failed Biometry attempts and Biometry is now locked. Passcode is required to unlock Biometry, e.g. evaluating PolicyDeviceOwnerAuthenticationWithBiometrics will ask for passcode as a prerequisite. |
kErrorBiometryNotAvailable | -6 |
Authentication could not start, because Biometry is not available on the device. |
kErrorBiometryNotEnrolled | -7 |
Authentication could not start, because Biometry has no enrolled fingers. |
kErrorInvalidContext | -10 |
LAContext passed to this call has been previously invalidated. |
kErrorPasscodeNotSet | -5 |
Authentication could not start, because passcode is not set on the device. |
kErrorSystemCancel | -4 |
Authentication was canceled by system (e.g. another application went to foreground). |
kErrorTouchIDLockout | -8 |
Authentication was not successful, because there were too many failed Touch ID attempts and Touch ID is now locked. Passcode is required to unlock Touch ID, e.g. evaluating PolicyDeviceOwnerAuthenticationWithBiometrics will ask for passcode as a prerequisite. |
kErrorTouchIDNotAvailable | -6 |
Authentication could not start, because Touch ID is not available on the device. |
kErrorTouchIDNotEnrolled | -7 |
Authentication could not start, because Touch ID has no enrolled fingers. |
kErrorUserCancel | -2 |
Authentication was canceled by user (e.g. tapped Cancel button). |
kErrorUserFallback | -3 |
Authentication was canceled, because the user tapped the fallback button (Enter Password). |
Policies
Constant | Value | Description |
---|---|---|
PolicyDeviceOwnerAuthentication | 2 | Device owner is going to be authenticated by biometry or user password. more |
PolicyDeviceOwnerAuthenticationWithBiometrics | 1 |
The policy for owner authentication with biometrics. |
PolicyDeviceOwnerAuthenticationWithBiometricsOrWatch | 4 | Device owner is going to be authenticated by biometry or Watch. more |
PolicyDeviceOwnerAuthenticationWithWatch | 3 | Watch authentication is required. If no nearby paired watch device can be found, more |
This class has no sub classes.
Some examples using this class:
Blog Entries
- Xojo 2021r1
- MBS Xojo Plugins Version 21.0 News
- MBS Xojo Plugins, version 18.4pr3
- MonkeyBread Software Releases the MBS Xojo plug-ins in version 17.0
- MBS Xojo / Real Studio Plugins, version 17.0pr1
Xojo Developer Magazine
Videos
Release notes
- Version 18.4
- Added interactionNotAllowed, localizedCancelTitle and localizedReason to LAContextMBS class.
- Version 17.0
- Added LAContextMBS class to query TouchID authentication. (Mac 64bit only)
The items on this page are in the following plugins: MBS Mac64bit Plugin.