I'm trying to implement Face ID in a script, but following the example Touch ID scripts it just results in a crash, with faulthandler just saying Aborted
This is what i'm using,
from objc_util import *
context = ObjCClass('LAContext').alloc().init()
policy = 1
reason = "FaceID Testing"
def _handler(_cmd, success, error):
autherr = ObjCInstance(error).localizedDescription()
print(autherr)
if success:
print('authenicated')
handler = ObjCBlock(_handler,restype = None, argtypes = [c_void_p, c_void_p, c_void_p])
context.evaluatePolicy_localizedReason_reply_(policy, reason, handler)
Using the "canEvaluatePolicy:error:" function, it returns true, so i'm assuming that Face ID works.
Also setting policy to 2, defaults to passcode authentication.
Of course it can as simple as @omz not adding "NSFaceIDUsageDescription" to pythonista's Info.plist
Thanks for any help!