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

df-selfie-check (Selfie Check 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 'df-selfie-check'
  • Run command to install

    pod install

    Now close the xcode project and open prj.xcworkspace instead.

  • Add your org’s SLCAccessToken token in your Info.plist file.

  • import SelfieCheckFramework in your UIViewController file where you want to use this feature.

  • And instantiate the view with following code.

     // Open view with default configuration
     SelfieCheck.sharedInstance.storyboardInstance(success: { [weak self] viewController in
        DispatchQueue.main.async {
            if let vc = viewController {
                self?.present(vc, animated: true, completion: nil)
            }
        }
        }, failure: { (error) in
            // Get the error if you are not authorized to access framework.
            print(error?.userInfo)
    })
    
    selfiCheck.returnClosure = { image in
        // Play with image here
        // Code Here
        // ...
    }

Output would be:

df-selfie-checkdf-selfie-checkdf-selfie-checkdf-selfie-check

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

selfiCheck.globalActioButtonColor = #colorLiteral(red: 0.4039215686, green: 0.7098039216, blue: 0.3647058824, alpha: 1)
selfiCheck.globalTitleActionButtonColor = #colorLiteral(red: 0.9725490196, green: 0.9725490196, blue: 0.9725490196, alpha: 1)
selfiCheck.globalBorderButtonColor = #colorLiteral(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0)
selfiCheck.globalOptionBorderButtonColor = #colorLiteral(red: 0.4039215686, green: 0.7098039216, blue: 0.3647058824, alpha: 1)
selfiCheck.overlayColor = #colorLiteral(red: 0, green: 0, blue: 0, alpha: 1)

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

selfiCheck.storyboardInstance(success: { [weak self] viewController in
DispatchQueue.main.async {
if let vc = viewController {
self?.present(vc, animated: true, completion: nil)
}
}
}, failure: { (error) in
print(error?.userInfo ?? “Your api token is not valid”)
})

selfiCheck.returnClosure = { image in
self.selfieImageView.image = image
}

Updated UI output would be:

Latest podspec

{
    "name": "df-selfie-check",
    "version": "1.0",
    "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/SelfieCheckFramework.zip"
    },
    "platforms": {
        "ios": "10.0"
    },
    "ios": {
        "vendored_frameworks": "SelfieCheckFramework.framework"
    },
    "swift_version": "4.0"
}

Pin It on Pinterest

Share This