Tutelar iOS SDK
Tutelar 是风险管理专家。我们强大的技术驱动的解决方案简化了欺诈风险管理的流程,并自动化了辅助业务流程,使公司能够专注于其核心产品和服务的改进。
要求
iOS
- 使用 iOS 11.0 或更高版本
- 使用 Swift 版本 5.0 或更高版本
- (可选)
Core Location permission
以获取设备位置
注意: 如果应用程序没有列出权限,将忽略使用这些权限收集的值。为了提供一个有效的设备指纹,我们建议根据您的用例尽可能使用更多权限。
步骤 1 - 安装
pod 'Tutelar', '~> 0.0.3'
pod update
步骤 2 - 导入 SDK
import Tutelar
步骤 3 - 初始化 SDK
要初始化 SDK,请添加以下代码行,并在其中使用从 Tutelar 商户面板获取到的公钥。如果您没有公钥,可以创建一个新的。
let tutelar = Fingerprint(key: " Your Unique Public Key ")
步骤 4 - 实现委托方法
使用以下代码来获取设备结果。
extension ViewController: FingerprintDelegate{
func onFailure(message: String) {
// Failure Callback.
}
func onSuccess(data: [String : Any]) {
// Success Callback
}
}
步骤 5 - 获取设备信息
通过调用以下函数接收以下设备信息。
tutelar.getDeviceDetails(withDelegate: self )
第六步 - 更新权限(可选)
您需要在Info.plist中添加此权限。
// This is probably the only one you need. Background location is supported
// when the app is using location service while in the background.
NSLocationWhenInUseUsageDescription
集成到此结束,现在将获得的设备指纹发送到服务器。