此项目依赖于主要的 Reach5 组件,可在https://github.com/ReachFive/reachfive-ios 找到。
将以下行添加到您的 Podfile 中
pod 'Reach5Google'
在 Xcode 中打开以下菜单项
File > Add Package Dependencies...
在 Search or Enter Package URL 搜索框中输入此 URL
https://github.com/ReachFive/reachfive-ios-google.git
然后,选择依赖规则并按 Add Package。
或者直接将其添加到 Package.swift 的 dependencies 值或 Xcode 中的 Package 列表中
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 找到公开方法的文档。
请参阅更新日志以查看每个版本的描述。