AppleLAContext - UBogun/Xojo-iosLib GitHub Wiki

Inherits from AppleObject
Memory leak check: untested.
Status: complete

This is an implementation of LAContext, the iOS native class for unlocking a device via fingerprint recognition.

Xojo integration

LAContext has no visible representation you can influence. It’s use is mainly in checking for the availability of TouchID on the current device and then displaying a built-in view to start the authentication. You can use it directly or use the iOSLibTouchID wrapper class.

Constructor

Constructor (): Creates a new AppleLAContext.

Methods

CanEvaluatePolicy (Error As AppleError) As Boolean: Returns the availability of TouchID on the device. The byref’ed Error object gives you localized details about the result.

EvaluatePolicy (Reason As Text, opt. ReplyBlock as AppleBlock = nil): Starts the TouchID authentication process if the device is TouchID-capable. Reason will be displayed as additional information. If you do not specify a custom AppleBlock/iOSBlock, the built-in private method EvaluationTrigger (Success As Boolean, ErrorPtr As Ptr) will be executed which switches to the main thread and raises the EvaluationResult Event.

Event

EvaluationResult (Success As Boolean, ErrorNumber As iOSLibTouchID.TouchIDError, Error As Text): Fires when a TouchID evaluation completed, with information about success and error reasons.