Fox.ONE Open SDK for Swift
将您的应用与 Fox.One 开放 SDK 集成,包括
- 提现
- 存款
- 资产概览
- 交易记录
- PIN
安装
CocoaPods
确保您正在运行最新版本的 CocoaPods,请运行
gem install cocoapods
# (or if the above fails)
sudo gem install cocoapods
将以下行添加到您的 Podfile
pod 'FoxOneOpenSDK'
运行 pod install
在您的 APP 中使用 Open SDK
-
请求 API 密钥
-
在 App 中注册 SDK
//import SDK import FoxOneOpenSDK //Register OpenSDK.registerSDK(key: "key", delegate: self)
-
实现 SDK 代理
extension AppDelegate: OpenSDKProtcol { //session token func f1AccessToken() -> String { return "" }
func f1PublicKey() -> String {
return ""
}
func f1PIN() -> String {
return ""
}
}
```
-
API SDK 服务
OpenSDKService.getAssets { completion in switch completion { case .success(let assets): self.handle(assets: assets) case .failure: break } }
API
- API - OpenSDKService API