3

Does anybody knows what is UI presented on Simulator when you call

self._authContext = LAContext()
if self._authContext.canEvaluatePolicy(.deviceOwnerAuthentication,
                                           error: &authError)
{
    self._authContext.evaluatePolicy(...
}

It asks for iPhone passcode, but in some unusual manner. Whatever you type in leads to success. Here is screenshot: enter image description here

On device, if passcode is off you just don't pass canEvaluatePolicy

Is there a default UI to setup passcode if iPhone passcode is disabled?

Thanks!

alexey.metelkin
  • 1,309
  • 1
  • 11
  • 20

2 Answers2

3

EDIT: I've not found any document from Apple yet, it's my assuming as described below.

It's fake UI for passcode authentication. On simulator, authContext.canEvaluatePolicy always response with true. Because of this, calling authContext.evaluatePolicy will open this UI above.

If you enable TouchID or FaceID on simulator, this UI will show up right after TouchID/FaceID fails in 3 times.

FYI: on simulator, you can use TouchID from Hardware > TouchID

enter image description here

nahung89
  • 7,745
  • 3
  • 38
  • 40
0

I'm not sure if this will help anyone.. but to trigger/test a success=false condition, you can press "enter" with an empty password string.

Lytic
  • 786
  • 5
  • 12