wix/AppleSimulatorUtils

When Using 'faceid--unmatch' my app is fully dismissed and doesn't give time to use an alert.

blairroebuck opened this issue · 13 comments

Description
Im sure this is more of an implementation discrepancy but hopefully someone can offer some help.

The utility correctly issues the 'NO' command when the prompt shows. however the application under test try to give the user the ability to 'Try Again'. or 'cancel' via an on screen alert.

Im trying to test this max retry of the 'Try Again' button, but at current I can't because as soon as the 'faceid=NO' command is sent, it dismisses me all the way back to the login screen of my app.

is there a way It can be configured to be softer ?

I’m sorry, I’m not sure I fully understand what the issue is.

I’m sorry, I’m not sure I fully understand what the issue is.

It is indeed difficult to explain and I sadly cant share a photo or video because of the application under test.

Essentially when opening the application from the springboard, I'm immediately prompted with a biometric challenge. The util correctly identifies this, and when passing it the 'YES' value, it unlocks the app.

When I pass it the 'NO' value, the real world experience we expect is that you're prompted by our application to 'Try Again' or 'cancel' the challenge.

The util at current is sending the 'NO' but I don't get a chance to interact with our 'Try Again' prompt on the screen, as I'm just returned back to our manual log in screen.

I think you are not using the tool correctly. applesimutils --setPermissions faceid=YES gives the Face ID permission to your app (NO means you app has no permission to ask for Face ID prompt). To mach or fail a mach, use the --matchFace and --unmatchFace APIs.

I think you are not using the tool correctly. applesimutils --setPermissions faceid=YES gives the Face ID permission to your app (NO means you app has no permission to ask for Face ID prompt). To mach or fail a mach, use the --matchFace and --unmatchFace APIs.

Sorry, I did a terrible job of most of the comments, I'm working on a few different PR's and got muddled.

I'm using --matchface and --unmatchface parameters. The above described is the behaviour I'm seeing when using --unmatchface.

Essentially, when you manually fail a biometric challenge, your prompted with the default OS 'Try Face ID again' or 'Cancel'.

I want to be able to manually click on the 'Try Face ID Again' button, but currently the util using the --unmatch face is closing that popup.

OK, I think this is not possible. The entire Touch ID/Face ID prompt is presented by a different process, and the only notification sent to the app is in the cases of success and failure of the entire process.

Why are you testing for that? The entire biometric authentication process is off-process and is Apple. You should not be testing if Apple is behaving correctly, only that your app behaves correctly if the user authenticates or fails to do so.

Thanks for the response @LeoNatan , I'm glad I managed to explain it a bit clearer (sorry again).

I'm trying to confirm that after X failed biometric attempt, our app displays the correct message that the user is now unable to authenticate via faceID, and that they now have to log in manually.

The current behaviour of the util is that it dismisses the FaceID prompt, but closes the whole prompt window, so I cant get to the Try again button, so I cant test the max retires functionality.

If you use the simulator menu, what behavior do you see?

@LeoNatan when using the simulator menu, it behaves as expected, after clicking 'Non-matching Face'. it fails the Face ID and leaves me looking at the 'Face not recognised - try again' prompt.

Using it via the util command effectively fails the Face ID challenge, then clicks cancel on the prompt.

Is there any update on this ? having done some more digging, were only using the native iOS biometric prompt.

You can open any application that uses Face ID on your phone, wait to be prompted and use someone else face to fail the challenge, you are then prompted with the ' Face not recognised - try again' prompt.

When using the util, you don't see this prompt, it's just dismissed. There is no option to use the 'try again' button.

I haven’t looked yet, unfortunately. If you’d like to assist in debugging, I’d appreciate it. The simulator process throws system notifications when the menu items are selected. Inspect those and compare to the notifications sent from applesimutils (you can find them in the code).

I can't reproduce the problem. When using unmatchFace, the system correctly displays the "Try again" message. It seems this prompt is broken, because the "Try Again" button doesn't work.

Screen Recording 2019-10-31 at 21.26.34.mov.zip

There is no reason why it shouldn't work, because the notification sent by selecting the menu items are the same as the ones sent from applesimutils.