FACEKI-KYC-IOS-V2 2.0.0

FACEKI-KYC-IOS-V2 2.0.0

Faceki Dev 维护。



  • 作者
  • faceki
# FACEKI-KYC-IOS-V2 SDK

## Overview

The FACEKI-KYC-IOS-V2 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-KYC-IOS-V2 SDK into your Xcode project using CocoaPods, add the following lines to your `Podfile`:

```ruby
target 'YourProjectName' do
  pod 'FACEKI-KYC-IOS-V2', '~> 2.0.0'
end

然后,运行以下命令

$ pod install

手动安装

您也可以手动将 FACEKI-KYC-IOS-V2 SDK 集成到您的项目中。从 GitHub 释放版 下载 SDK,并按照文档中的说明进行操作。

权限

将以下使用说明添加到您的 Info.plist 文件中

<key>NSCameraUsageDescription</key>
<string>For taking photos for kyc</string>

使用

回调

实现以下回调以处理 SDK 响应

回调函数,用于接收API返回的数据级别信息 https://kycdocv2.faceki.com/api-integration/verification-apis

func onComplete(data: [AnyHashable: Any]) {
    print("API Response")
    print(data["responseCode"])
    print(type(of: data))

    if let dataObject = data["data"] as? [AnyHashable: Any] {
        print(dataObject["requestId"]!)
    }
}

// Redirect After Result Screen

func onRedirectBack() {
    DispatchQueue.main.async {
        // Perform UI work here
        self.navigationController?.popToRootViewController(animated: true)
    }
}

初始化

import FACEKI_KYC_IOS_V2

class YourViewController: UIViewController {

    @IBAction func captureAction(_ sender: Any) {
        let smManagerVC = Logger.initiateSMSDK(
            setClientID: "yourClientId",
            setClientSecret: "yourClientSecret",
            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-KYC-IOS-V2 SDK是以MIT许可证发布的