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