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
The class for local authentication via password or TouchID.

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 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.


Label   -   LargeBinaryStreamMBS


The biggest plugin in space...