Xamarin.Forms iOS-liveness-sdk-plugin

Running the demo project

  1. Download the demo project and extract it, then open this project using Visual Studio.

  2. Modify the MainPage.xaml.cs to specify your market and license content(The license content is obtained by your server calling our openapi).

  3. Run project XamarinFormsDemo01.iOS on your iPhone device.

Getting started

  1. Integrate the SDK into your project:

    1. Add NuGet source https://public-n3.advai.net/repository/nuget-hosted/.
    2. Add package AdvanceAI.iOS.Liveness.
  2. Add camera and motion sensor (gyroscope) usage description in Info.plist as bellow. Ignore this step if you have added those.

  3. New interface ILivenessService.cs to your XamarinForms project:

  4. New IOSLivenessService.cs to your XamarinForms.iOS project:

  5. In your XamarinForms project, specify your market and license content, then show SDK page :

Error code

The errorCode values of Result are as follows:

errorCoderaw native sdk codeDescription
PREPARE_TIMEOUTfail_reason_prepare_timeoutTimeout during the preparation stage
ACTION_TIMEOUTfail_reason_timeoutTimeout during the motion stage
MUTI_FACEfail_reason_muti_faceMultiple faces detected during the motion stage
FACE_MISSINGfail_reason_facemiss_blink_mouthFace is missing during the motion stage(blink or open mouth)
FACE_MISSINGfail_reason_facemiss_pos_yawFace is missing during the motion stage(pos yaw)
MUCH_ACTIONfail_reason_much_actionMultiple motions detected during the motion stage
USER_GIVE_UPuser_give_upThe user clicked the top left back button during the detection process
NO_RESPONSE Network request failed
UNDEFINED Other undefined errors
...(Other server side error codes)