# iOS Active Liveness Online
# 📜 Introduction
Documentation below will help you in integrating the Online Active Liveness SDK to your own iOS Application.
Reading Time: 3 min read
# 🔧 How it works ?
LivenessSDK is based on the Gesture detection of the user. Users will be directed to perform facial gestures such as Blink, Nod etc and expected to be performed within a set period of time. The trueness of the Action is then evaluated to verify live users.
# What can I use Liveness SDK for ?
Ensure Secure use of your application by determining liveness of your users.
# 📚 Documentation
- Step 1: Sign up for a developer account through FaceX User Portal
- Step 2: Navigate to Plans & Payments Tab & Select Plans
- Step 3: Purchase a plan matching your requirement from the Online Active Liveness SDK
- Step 4: Navigate to Mobile SDK Tab & Select License History
- Step 5: Download the plist file for iOS SDK from the online license section
- Step 6: Download the Online Active Livenesss iOS SDK from this Github LivenessSDKOnline
- Step 7: Add the plist file from the portal to your project.
# ✔️ Supported Devices
- Supports iOS 12.0+
- Supports binary
- Supports iPhone and iPad
# 🔍 Software Prerequisite
- Requires Swift 4/5 and Xcode 10.x
# 📲 Installation Using CocoaPods
CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate Alamofire into your Xcode project using CocoaPods, specify it in your Podfile
:
# 1. Create Podfile
and add pod 'LivenessSDKOnline'
:
use_frameworks!
target 'YourApp' do
pod 'LivenessSDKOnline'
end
# 2. Install pods:
$ pod install
# 3. Import the module:
Swift:
import LivenessSDKOnline
# 🐒 How to use
import LivenessSDK
var liveness = Liveness()
liveness.delegate = self
liveness.enableEyes = true
liveness.enableMouth = true
liveness.enableYaw = true
liveness.startLiveness()
// To stop and exit Liveness View
liveness.stopLiveness()
# 🏄 Delegates
# LivenessDelegate
func livenessSuccess(live: Bool) {
}
func livenessError(live: Bool, error: NSError) {
}
# 🎛 Customization
You can set some properties for liveness.
# Steps
Steps | Value | Default |
---|---|---|
Eyes(enableEyes) | Bool | false |
Mouth(enableMouth) | Bool | false |
Yaw(enableYaw) | Bool | false |
Random Steps(randomSteps) | Bool | true |
# Thresholds
Property | Min. Value | Max. Value | Default |
---|---|---|---|
Eyes closed Threshold(eyeThreshold) | 0.05 | 0.2 | 0.1 |
Mouth opened Threshold(mouthThreshold) | 0.1 | 0.6 | 0.35 |
Each step timer(timerSeconds) | Seconds | Seconds | 5 seconds |
# Localization Strings
Add these strings to your respected Localization.Strings language file
"Please blink your eyes"
"Please open your mouth"
"Please turn your face to right and left"
"Thank You"
"No face Detected"
"Perfect"
"Please bring your face inside face outline above"
# 📋 Supported OS & SDK Versions
- iOS 12.0+
- iPadOS 13.0+
- Swift 5