# FACEKI-BLAZE-IOS SDK
## Overview
The FACEKI-BLAZE-IOS SDK is an iOS framework developed by Faceki, providing advanced eKYC (Electronic Know Your Customer) and Facial Recognition capabilities for iOS applications. This SDK enables seamless identity verification using document and selfie verification.
## Installation
### CocoaPods
To integrate FACEKI-BLAZE-IOS SDK into your Xcode project using CocoaPods, add the following lines to your `Podfile`:
```ruby
target 'YourProjectName' do
pod 'FACEKI-BLAZE-IOS', '~> 3.0.0'
end
然后,运行以下命令
$ pod install
手动安装
您还可以手动将 FACEKI-BLAZE-IOS SDK 集成到您的项目中。从 GitHub 发行版 下载 SDK,并按照文档中的说明进行操作。
权限
将以下使用描述添加到您的 Info.plist 中
<key>NSCameraUsageDescription</key>
<string>For taking photos for kyc</string>
使用
回调
实现以下回调以处理 SDK 的响应
将响应回传给 API 的数据级别回调 https://docs.faceki.com
func onComplete(data:[AnyHashable:Any]){
print("API Response")
print(type(of: data))
if let dataObject = data["result"] as? [AnyHashable: Any]{
print(dataObject["requestId"]!)
print(dataObject["decision"]!)
}
}
// Redirect After Result Screen
func onRedirectBack() {
DispatchQueue.main.async {
// Perform UI work here
self.navigationController?.popToRootViewController(animated: true)
}
}
初始化
import FACEKI_BLAZE_IOS
class YourViewController: UIViewController {
@IBAction func captureAction(_ sender: Any) {
let smManagerVC = Logger.initiateSMSDK(
setClientID: "yourClientId",
setClientSecret: "yourClientSecret",
workflowId:"yourworkflowID",
setOnComplete: onComplete,
redirectBack: onRedirectBack,
selfieImageUrl: nil,
cardGuideUrl: nil
)
navigationController?.pushViewController(smManagerVC, animated: true)
}
// ... (rest of your ViewController code)
}
需求
- Swift 5.0
- iOS 13.0 及以上版本
许可
FACEKI-BLAZE-IOS SDK 在 MIT 许可证 下发布