Latest 1.0.1
Homepage https://github.com/anandramdeo-df/df-selfie-check
License MIT
Platforms ios 10.0
Authors

df-selfie-check (DFSelfieAuth SDK)

This SDK is created to automatically capture the user’s selfie using the facial expression( eye-blink in our case). It will ensure that user have to be physically present while taking the selfie.

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

  • In a new terminal window, run pod install --repo-update to install and update. Get Cocoapods
    you can skip this case if you have updated pod in you mac.

  • Create the podfile in your project.

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

    pod 'DFSelfieAuth'
  • 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 your org’s SLAccessToken token in your Info.plist file.

    <key>SLAccessToken</key>
    <string>Enter your org&apos;s token</string>
  • import DFSelfieAuth in your UIViewController file where you want to use this feature.

  • And instantiate the view with following code.

     // Open view with default configuration
    
    DFSelfieAuth.sharedInstance.getSelfieImage(success: { (image) in
        self.selfieImageView.image = image
    }, failure: { (error) in
        print(error?.userInfo ?? "Your api token is not valid")
    })

Output would be:

DFSelfieAuthDFSelfieAuthDFSelfieAuthDFSelfieAuth

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 DFSAInstance = DFSelfieAuth.sharedInstance
DFSAInstance.globalBGColor = #colorLiteral(red: 0.9137254902, green: 0.3921568627, blue: 0.3647058824, alpha: 1)
DFSAInstance.globalMessagesColor = UIColor.white
DFSAInstance.globalTitleColor = UIColor.white
DFSAInstance.globalButtonCornerRadius = 5
DFSAInstance.globalOptionButtonColor = #colorLiteral(red: 0.9725490196, green: 0.9725490196, blue: 0.9725490196, alpha: 1)
DFSAInstance.globalTitleOptionButtonColor = #colorLiteral(red: 0.4039215686, green: 0.7098039216, blue: 0.3647058824, alpha: 1)
DFSAInstance.navigationTitleColor = #colorLiteral(red: 0.4039215686, green: 0.7098039216, blue: 0.3647058824, alpha: 1)
DFSAInstance.globalActioButtonColor = #colorLiteral(red: 0.4039215686, green: 0.7098039216, blue: 0.3647058824, alpha: 1)
DFSAInstance.globalTitleActionButtonColor = #colorLiteral(red: 0.9725490196, green: 0.9725490196, blue: 0.9725490196, alpha: 1)

DFSAInstance.tipGuidanceOne = “Tip : Please look straight and then blink eyes.”
DFSAInstance.titlePermissionVC = “Please Allow camera permission.”

DFSAInstance.getSelfieImage(success: { (image) in
self.selfieImageView.image = image
}, failure: { (error) in
print(error?.userInfo ?? “Your api token is not valid”)
})

Updated UI output would be:

Latest podspec

{
    "name": "DFSelfieAuth",
    "version": "1.0.1",
    "summary": "This SDK is created to automatically capture the user's selfie using the facial expression( eye-blink in our case).",
    "description": "This SDK is created to automatically capture the user's selfie using the facial expression( eye-blink in our case). It will ensure that user have to be physically present while taking the selfie.",
    "homepage": "https://github.com/anandramdeo-df/df-selfie-check",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Kritika Middha": "[email protected]"
    },
    "source": {
        "http": "https://github.com/anandramdeo-df/df-selfie-check/releases/download/1.0.1/DFSelfieAuth.zip"
    },
    "platforms": {
        "ios": "10.0"
    },
    "ios": {
        "vendored_frameworks": "DFSelfieAuth.framework"
    },
    "swift_version": "4.0"
}

Pin It on Pinterest

Share This