TacirlerSDK_DOB_iOS
要求
- +iOS 13.0
安装
TacirlerSDK 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile
use_frameworks!
platform :ios, '13.0'
target 'YOUR-TARGET-NAME' do
pod 'TacirlerSDK_DOB_iOS'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
end
end
end
配置
- 在目标应用程序中选择
签名 & 兼容性
选项卡,然后单击+Capability
按钮,并添加近距离场通信标签读取
能力。 - 添加您的 Info.plist 文件所需的权限;
<!--
FOR NFC
-->
<key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
<array>
<string>A0000002471001</string>
</array>
<key>NFCReaderUsageDescription</key>
<string>Permission string</string>
<!--
FOR Camera
-->
<key>NSCameraUsageDescription</key>
<string>Permission string</string>
<key>NSMicrophoneUsageDescription</key>
<string>Permission string</string>
- 确保您在
.entitlements
文件中具有以下行;
<dict>
<key>com.apple.developer.nfc.readersession.formats</key>
<array>
<string>TAG</string>
</array>
</dict>
用法
首先导入 SDK;
import TacirlerSDK
然后,创建一个视图控制器对象以开始周期;
let vc = TacirlerSDKViewController()
然后,将该视图控制器传给按钮。例如;
@objc func nextClicked() {
vc.modalTransitionStyle = .coverVertical
vc.modalPresentationStyle = .fullScreen
present(vc, animated: true)
}
- 屏幕上的
x
按钮用于关闭
SDK。另外,当周期结束时,主页
按钮用于关闭
SDK。
具有自定义选项的示例用法
import UIKit
import TacirlerSDK
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Perform necessary tasks in case of memory shortage here.
}
@IBAction func clicked(_ sender: Any) {
// Customize your theme settings
// if you comment out this section it will be show the default app color theme in your device/simulator.
let customTheme = SDKConfiguration(
backgroundColor: UIColor.lightGray,
contentViewBackgroundColor: UIColor.cyan,
buttonEnabledBackgroundColor: UIColor.green,
buttonDisabledBackgroundColor: UIColor.red,
buttonTextColor: UIColor.purple,
placeHolderTextColor: UIColor.brown,
borderColor: UIColor.cyan,
tintColor: UIColor.purple,
iconColor: UIColor.orange,
checkBoxColor: UIColor.brown,
viewControllerTitleColor: UIColor.red,
logoImageName: "logo3",
fontType: .aguafinaScriptRegular
)
// Set the theme through SDKConfigManager
SDKConfigManager.shared.sdkConfiguration = customTheme
// Create TacirlerSDKViewController
let vc = TacirlerSDKViewController()
vc.authorizeToken(
// put your token and license id in here
// if you don't available or lost it contact with:
// [email protected]
inputToken: "YOUR_TOKEN",
licenseID: "YOUR_LICENSE_ID"
)
// Present TacirlerSDKViewController modally
vc.modalTransitionStyle = .coverVertical
vc.modalPresentationStyle = .fullScreen
present(vc, animated: true)
}
}
SDK 流
KVKK 批准屏幕
用户需要勾选两个复选框才能继续。KVKK 政策和商务及电子消息屏幕
MASAK 声明屏幕
每日和每月通知屏幕
用户需要勾选复选框才能继续。NFC 可用性检查屏幕
在这个屏幕上应该进行 NFC 可用性控制,否则,用户无法继续。表单屏幕
用户需要填写表格才能继续。问卷屏幕
用户需要选择一个选项才能继续。如果他们选择其他或 "Tacirler 投资 个人",用户需要填写文本字段。电话号码屏幕
短信 OTP 代码屏幕
MRZ 扫描屏幕
TR 身份证应出示给相机才能继续。NFC 读取屏幕
TR 身份证应出示给手机的背面才能继续。信息检查屏幕
自拍屏幕
自拍检查屏幕
地址验证屏幕
居住地表格上的 QR 码可以被扫描。客户信息屏幕
视频通话屏幕
结果屏幕
应用程序失败应用程序成功作者
Papilon Savunma