Hi,
I am trying to use TMSFMXNativeLocalAuthentication to log in to my app with TouchID.
However, I am getting an access violation everytime I use it.
After debugging, it seems to happen inside the source code for the Authenticate-procedure. Here is the code:
procedure TTMSFMXNativeLocalAuthentication.Authenticate(AMessage: String);
var
ctx: LAContext;
error: PPointer;
auth: Cardinal;
e: NSError;
str: String;
begin
ctx := TLAContext.Wrap(TLAContext.Wrap(TLAContext.OCClass.alloc).init);
error := nil;
auth := LAPolicyDeviceOwnerAuthentication;
if ctx.canEvaluatePolicy(auth, error) then <------Crashes on this line
begin
if Assigned(error) then
begin
e := TNSError.Wrap(error);
str := UTF8ToString(e.localizedDescription.UTF8String);
end
else
ctx.evaluatePolicy(LAPolicyDeviceOwnerAuthentication, NSStrEx(AMessage), AuthenticateComplete);
end;
ctx.release;
end;
Anybody have any similar issues?
Delphi 10.2.3
Newest version of TMS iCL.