iOS SDK
Getting Started
Latest release: version 3.1.1
Requirements
- iOS 11.0 and higher
- Internet connection
- Swift Version should be latest
Resources
- Integration Sample: iOS Sample App
Installation
It’s always recommended to use the updated version and run on physical device to get real results.
Cocoapods:
1. Add following pod to your Podfile
pod 'Facia', :tag => '3.1.1', :git => "https://github.com/FaciaMobile/ios-core"
Permissions:
Application Info.plist must contain Privacy - Camera Usage Description
with corresponding explanation to end-user about how the app will use these permissions
Basic Usage
Make sure you have obtained authorization credentials before proceeding. You can get Login credentials (email & password) by contacting to Facia support team
Authorization
For authorization, Facia's SDKs require Access token. You can get access token from the API: https://app.facia.ai/backend/api/transaction/get-access-token/
Request Object
Parameters | Description |
---|---|
Required: Yes Type: String | |
password | Required: Yes Type: String |
Configuration
The Facia’s mobile SDKs can be configured on the basis of parameters provided in the config object. The details of parameters can be found here.
let config = [
"showConsent" : true,
"showVerificationType" : true,
"showResult" : true
]
Initialisation
Facia’s mobile SDK can be initialised by using the given method and passing activity instance, token, config object and callback listener as the parameters.
let facia = Facia()
facia.createRequest(parentViewController: self,
accessToken: "ACCESS_TOKEN",
configs: config) { result in
print(result)
}
Callbacks
The SDK receive callbacks on termination, whether after the request completion or if the journey is left mid-way. The callbacks are received as
Callbacks
facia.createRequest(parentViewController: self,
accessToken: "ACCESS_TOKEN",
configs: config) { result in
let reponse = result as! NSDictionary
}
Callback Handling
All the callbacks can be handled inside the client’s calling activity. The responses and callback handling can be seen below.
On SDK Completion
3D Liveness
if let event = dataDictionaryToSend["event"] as? String, event == "liveness.verified" {
// Liveness Accepted Callback
}
esle if event = dataDictionaryToSend["event"] as? String, event == "liveness.unverified" {
// // Liveness Declined Callback
}
Photo ID Match
if let event = dataDictionaryToSend["event"] as? String, event == "photo_id.match_success" {
// Photo Id Matched Success Callback.
} else if event = dataDictionaryToSend["event"] as? String, event == "photo_id.match_failure" {
// Photo Id Matched Failure Callback.
}
On SDK Error
if let event = dataDictionaryToSend["event"] as? String, event == "error.occurred " {
// The error.occured event occurs when the unknown error occured.
}
else if event = dataDictionaryToSend["event"] as? String, event == "request.timeout"{
// This will occur if request has timed-out.
}
else if event = dataDictionaryToSend["event"] as? String, event == "permission.denied"{
// This event is returned if the user did not give camera and other permissions to sdk.
}
else if event = dataDictionaryToSend["event"] as? String, event == "verification.cancelled"{
//This event occurs when the end-user does not agree to the terms and conditions and also occur if in-between user cancel verification process.
}
else {
// Some error has been occured during the verification process
}
Customisation
Facia supports a set of customisation options that will influence the appearance of the mobile SDK.
Colours
The colour of buttons and font can be customized using the following parameters with Facia's instance.
facia.face_detected_oval_color = .green
facia.face_not_detected_oval_color = .red
facia.dark_text_color = .black
facia.light_text_color = .grey
facia.ql_instruction_bg_color = .lightgrey
facia.button_bg_color = .blue
facia.button_text_color = .white
facia.dialog_button_text_color = .blue
SDK Size
The complete size of Facia's iOS SDK is 11.5 MB.
Changelog
Date | SDK Versions | Changes |
---|---|---|
Dec 17, 2024 | 3.1.1 | Endpoints Updated. |
May 19, 2024 | 3.0.9 | Features improvement. |
May 19, 2024 | 3.0.7 | Support for the new Xcode version. |
Apr 07, 2024 | 3.0.6 | Liveness instructions updated. |
Mar 15, 2024 | 3.0.5 | Update Swift Version. |
Mar 13, 2024 | 3.0.4 | Minor Tweaks. |
Feb 23, 2024 | 1.1.4 | Update Swift Version. |
Feb 23, 2024 | 1.1.3 | Improve instructions flow. |
Dec 08, 2023 | 1.1.2 | Improved Responsiveness. |
Nov 27, 2023 | 1.1.1 | Improved design & Liveness flow. |
Nov 17, 2023 | 1.1.0 | Improved Passive Liveness flow & design. |
Nov 02, 2023 | 1.0.8 | Improved functionality and design |
Oct 23, 2023 | 1.0.7 | Improve Result API Flow |
Oct 19, 2023 | 1.0.6 | 3D Liveness & Photo ID Match features are added. |