将 SmartId 安装到您的项目中
- 使用 Swift Package Manager,在项目依赖项中添加以下内容,确保指向为您的业务设计的分支。
https://github.com/DevelSystems/SmartID-iOS
现在您可以导入 SmartId 框架到您的文件中。
要初始化位置服务,将以下行添加到您的 AppDelegate > func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool 方法。
SID.startLocation()
要初始化诈骗检测,将以下行添加到您的 AppDelegate > func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool 方法。
SID.startPharming(isProduction: isProduction)
-
如果您是从之前的版本更新,您需要从项目配置和切片脚本中删除所有旧引用。
-
SmartId 类已重命名为 SID,因此您需要在代码库中更新引用。