EkycID iOS SDK 允许您在 iOS 应用程序中构建令人惊叹的 OCR 和人脸识别体验。
通过快速扫描,用户将能够从身份证、护照、驾照、车牌、车辆登记证、COVID-19 疫苗接种卡和其他政府发行的任何文件中提取信息。
EkycID 是
- 通过支持原生和混合应用程序的 SDK,轻松集成到现有生态系统和解决方案中。
- 由于文档检测和活体检测是在设备上直接离线进行的,因此用户体验更佳。
- 非常适合降低运营成本和提高效率,通过减少对人力劳动和手动数据录入时间的依赖。
EkycID 可以
- 通过文档识别和 OCR 从身份证提取信息。
- 通过活体检测和人脸识别验证个人是真实的还是虚假的。
- 通过结合文档检测、OCR、活体检测和人脸识别的力量,验证身份文件的真实性。
要查看所有这些功能的工作情况,请下载我们的免费演示应用 PlayStore。对于 iOS 设备,最近正在 Apple 复审中,您可以联系我们的开发者通过 TestFlight 尝试使用。
- 最低 iOS 部署目标:10.0
- Xcode 13 或更高版本
- Swift 5
- EkycID 仅支持 64 位架构 (x86_64 和 arm64)。
步骤 1: 将以下内容添加到 Info.plist。
<!-- Camera Access -->
<key>NSCameraUsageDescription</key>
<string>Camera Access for Scanning</string>
步骤 2: 前往项目 > 运行器 > 构建设置 > 排除架构 > 任何 SDK > armv7
步骤 3: 根据以下所示调整您的 Podfile。
# add this line:
$iOSVersion = '10.0'
post_install do |installer|
# add these lines:
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=*]"] = "armv7"
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = $iOSVersion
end
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
# add these lines:
target.build_configurations.each do |config|
if Gem::Version.new($iOSVersion) > Gem::Version.new(config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'])
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = $iOSVersion
end
end
end
end
步骤 4: 将以下行添加到 Podfile。然后运行 pod install。
pod 'EkycID'
class ViewController: UIViewController, DocumentScannerEventListener {
var cameraView: DocumentScannerCameraView!
func onInitialize() {
print("onInitialize")
}
func onDetection(detection: DocumentScannerResult) {
print("onDetection")
let image = UIImageView(image: detection.faceImage!)
self.view.addSubview(image)
}
func onFrame(frameStatus: FrameStatus) {
if (frameStatus != .PROCESSING) {
print("\(frameStatus)")
}
}
override func viewDidLoad() {
super.viewDidLoad()
}
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
self.cameraView = DocumentScannerCameraView(
frame: self.view.frame,
options: DocumentScannerOptions(preparingDuration: 1)
)
self.cameraView!.setWhiteList(whiteList: ["NATIONAL_ID"])
self.cameraView.addListener(self)
self.view.addSubview(self.cameraView)
self.cameraView.start()
}
override func viewDidDisappear(_ animated: Bool) {
self.cameraView.stop()
}
}
class ViewController: UIViewController, LivenessDetectionEventListener {
func onCountDownChanged(current: Int, max: Int) {
print("current: \(current), max: \(max)")
}
func onFocus() {
print("onFocus fish")
}
func onFocusDropped() {
print("onFocusDropped")
}
func onPromptCompleted(completedPromptIndex: Int, success: Bool, progress: Float) {
print("onPromptCompleted: \(completedPromptIndex), \(success), \(progress)")
self.cameraView.nextImage()
}
func onAllPromptsCompleted(detection: LivenessDetectionResult) {
print("onAllPromptsCompleted")
}
func onInitialize() {
print("onInitialize")
}
func onFrame(frameStatus: FrameStatus) {
if frameStatus != .PROCESSING {
print("\(frameStatus)")
}
}
var cameraView: LivenessDetectionCameraView!
override func viewDidLoad() {
super.viewDidLoad()
}
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
self.cameraView = LivenessDetectionCameraView(
frame: self.view.frame,
options: LivenessDetectionOptions(prompts: [LivenessPromptType.BLINKING, LivenessPromptType.LOOK_RIGHT], promptTimerCountDownSec: 5)
)
self.cameraView.addListener(self)
self.view.addSubview(self.cameraView)
self.cameraView.start()
}
override func viewDidDisappear(_ animated: Bool) {
self.cameraView.stop()
}
}
要执行人脸比较和 OCR,您可以调用您的服务器,该服务器集成了我们的 NodeSDK,分别获取人脸比较分数和 OCR 响应。
对于任何其他问题,您可以随时通过 ekycsolutions.com 联系我们
© 2022 EKYC Solutions Co, Ltd. 版权所有。