iOS Biometric Testing

Prev Next

A majority of mobile devices today support Biometric hardware sensors to authenticate the device owner’s identity. pCloudy enables you to test the Authentication features such as Touch ID/Face ID on the apple devices connected on the pCloudy platform.

Simply connect to a device on the platform and once the device is connected, the user can inject a passing or failing Touch ID or face ID, depending on the device model.

Touch ID supported Devices
Face ID supported Devices

  • App should be installed with the pCloudy biometric framework. Download the File
  • Steps to configure the pCloudy biometric framework with your test application
    • Extract the downloaded zip file
    • Once the file is extracted, add "BiometricAuthentication.framework" to your project
    • Mention "import BioMetricAuthenticator" on your project as shown in below screenshot
      image.png
    • Use BioMetricAuthenticator instead of LAContext as shown in below code
      image.png

Once the above steps are performed. You can go ahead and use the generated .ipa file on the pCloudy devices for biometric authentication.

  • App should stay in front during testing
  • The application must be "resigned or trusted" at time of installation on device.

pCloudy allows users to bypass the “biometric auth” in a manual test or an automated process by using Appium.

  1. Connect any iOS device and click on “INSTALL”.
    image.png

  2. Install the application on the connected device. Make sure that the app under test stays in the foreground.
    image.png

  3. Open “All Actions” and click on “Touch ID” or “Face ID” icon
    image.png

  4. In the Touch ID or Face ID, do one of the following:

    • To test a successful Touch ID or Face ID, click on Pass
    • To test an invalid Touch ID or Face ID, click Fail

image.png

image.png

pCloudy command:mobile:biometric:auth

The command should be activated in the automation script at the point that the target application presents a "popup" indicating that the application is trying to retrieve information from the Touch/Face ID reader.

This command will inject the authentication reply for Touch/Face ID check performed by the application.

Map<String, Object> params = new HashMap<>();
//Enter authentication result as true or false
params.put("auth", true);
System.out.println(driver.executeScript("mobile:biometric:auth",params));
Plain text