此项目依赖于位于 https://github.com/ReachFive/reachfive-ios 的主要 Reach5 组件
将以下行添加到您的 Podfile
pod 'Reach5Google'
在 Xcode 中打开以下菜单项
文件 > 添加包依赖...
在 搜索或输入包 URL 搜索框中输入此 URL
https://github.com/ReachFive/reachfive-ios-google.git
然后,选择依赖规则并按 添加包。
或者直接将其添加到您的 Package.swift 的依赖项值或 Xcode 中的包列表中
dependencies: [
.package(url: "https://github.com/ReachFive/reachfive-ios-google.git", .upToNextMajor(from: "7.0.0"))
]
打开项目文件夹以将其作为包项目查看,而不是 .xcodeproj 或 .xcworkspace,这将使其看起来像一个 Pod 项目
请参阅公开文档以安装 SDK 并初始化您的 ReachFive 客户端。
基本步骤是
- 配置
let reachfive: ReachFive = ReachFive(sdkConfig: sdkConfig, providersCreators: [GoogleProvider()])
- 初始化
在 UIApplicationDelegate
的相应方法中调用此方法(该方法是网络调用)
reachfive.application(application, didFinishLaunchingWithOptions: launchOptions)
您可以在 https://developer.reachfive.com/sdk-ios/index.html 上找到暴露的方法的文档。
请参阅变更日志以查看每个版本的描述。