Latest 1.0.2
Homepage https://github.com/anandramdeo-df/df-secure-otp
License MIT
Platforms ios 10.0
Authors

df-secure-otp(DFLivelinessAuth SDK)

This SDK is created to capture a short video of user so that it could be sent to Datafornix server to check if the face in the video matches with the user’s selfie or photo extracted from identity document.

An OTP of numbers will appear on screen while recording video and user have to speak those words, after recording spoken numbers will be matched via Speech-to-Text processing.

You can achieve the functionality with easy integration of following steps:

  • Create the podfile in your project.

    pod init
  • Open the pod file from directory and add pods in podfile.

    pod 'DFLivelinessAuth'
  • Run command to install

    pod install

    If any error occure in the process of pod install then try with pod update command.
    Now close the xcode project and open prj.xcworkspace instead.

  • Add the following keys in your

    • your org’s VLAccessToken token in your Info.plist file.

      <key>VLAccessToken</key>
      <string>Enter your org&apos;s token</string>
    • Privacy – Camera Usage Description, Privacy – Microphone Usage Description, Privacy – Speech Recognition Usage Description

      <key>NSCameraUsageDescription</key>
      <string>We need to access your camera to record your video.</string>
      
      <key>NSMicrophoneUsageDescription</key>
      <string>We need to access your microphone to record your audio.</string>
      
      <key>NSSpeechRecognitionUsageDescription</key>
      <string>We need to access your speech recognizatio.</string>
  • import DFLivelinessAuth in your UIViewController file where you want to use this feature.

  • And instantiate the view with following code and this will also return the video data if user spoken correct words.

    let DFVLInstance = DFLivelinessAuth.sharedInstance
    
    DFVLInstance.getRecordedVideo(success: { (data, status) in
        if status {
            // When user spoken correct words.
        } else {
            // When user spoken incorrect words.
        }
    }, failure: { (error) in
    // If user is unabel to authenticate or didn't provide API key.
        print(error)
    })

Output would be:

&nbsp &nbsp
&nbsp &nbsp
&nbsp &nbsp

You can cutomize the color and theme of the SDK’s view according to your projects user-experience.

Just access the properties mentioned in the SDK. Have a look at the sample below:

let DFVLInstance = DFLivelinessAuth.sharedInstance

DFVLInstance.guidanceHeadingText = “Scan the Document.”
DFVLInstance.guidanceHeadingTextColor = #colorLiteral(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0)
DFVLInstance.guidanceDescriptionTextColor = #colorLiteral(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0)

DFVLInstance.regularFont = “Marker Felt”
DFVLInstance.boldFont = “Marker Felt”

DFVLInstance.guidanceContinueButtonBgColor = #colorLiteral(red: 0.4078431373, green: 0.7058823529, blue: 0.3647058824, alpha: 1)
DFVLInstance.guidanceCancelButtonTextColor = #colorLiteral(red: 0.4078431373, green: 0.7058823529, blue: 0.3647058824, alpha: 1)

DFVLInstance.guidanceBgColor = #colorLiteral(red: 0.9098039216, green: 0.3921568627, blue: 0.3647058824, alpha: 1)
DFVLInstance.videoVCGradientColor = #colorLiteral(red: 0.9098039216, green: 0.3921568627, blue: 0.3647058824, alpha: 0.581255008)

DFVLInstance.getRecordedVideo(success: { (data, status) in
if status {
// When user spoken correct words.
} else {
// When user spoken incorrect words.
}
}, failure: { (error) in
// If user is unabel to authenticate or didn’t provide API key.
print(error)
})

Latest podspec

{
    "name": "DFLivelinessAuth",
    "version": "1.0.2",
    "summary": "This SDK is created to capture a short video of user to check if the video matches with the user's photo extracted from identity document.",
    "description": "This SDK is created to capture a short video of user so that it could be sent to Datafornix server to check if the face in the video matches with the user's selfie or photo extracted from identity document. An OTP of numbers will appear on screen while recording video and user have to speak those words, after recording spoken numbers will be matched via Speech-to-Text processing.",
    "homepage": "https://github.com/anandramdeo-df/df-secure-otp",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Kritika Middha": "[email protected]"
    },
    "source": {
        "http": "https://github.com/anandramdeo-df/df-secure-otp/releases/download/1.0.2/DFLivelinessAuth.zip"
    },
    "platforms": {
        "ios": "10.0"
    },
    "ios": {
        "vendored_frameworks": "DFLivelinessAuth.framework"
    },
    "swift_version": "4.0"
}

Pin It on Pinterest

Share This