有关 CloudX 控制台映射和 Google 侧设置,请参阅 Google Waterfall 竞价方指南。本页仅说明 iOS 特定的集成细节。 Google Waterfall 适配器支持横幅 (320×50) 和中矩形 (300×250) 广告格式。此适配器不支持插屏和激励广告。Documentation Index
Fetch the complete documentation index at: https://docs.cloudx.io/llms.txt
Use this file to discover all available pages before exploring further.
安装
CocoaPods
Podfile
Swift Package Manager
在项目中同时添加 CloudX 包和 Google Mobile Ads 包,然后添加CloudXGoogleWaterfallAdapter 产品:
- CloudX:
https://github.com/cloudx-io/cloudx-ios - Google Mobile Ads:
https://github.com/googleads/swift-package-manager-google-mobile-ads
手动安装
- 从 Releases 下载
CloudXGoogleWaterfallAdapter.xcframework.zip - 解压并将
CloudXGoogleWaterfallAdapter.xcframework拖入您的 Xcode 项目 - 手动添加 Google Mobile Ads SDK(
Google-Mobile-Ads-SDK 12.14.0)。
Info.plist 配置
Google 应用标识符(必需)
Google Mobile Ads SDK 需要在 Info.plist 中配置您的 AdMob 应用 ID。否则应用将在启动时崩溃:Info.plist
SKAdNetwork IDs(iOS 14.5+ 必需)
添加 Google 的 SKAdNetwork 标识符,以便 Google 归因安装。Google 的主标识符为:Info.plist
App Tracking Transparency(iOS 14+)
Info.plist
项目配置
链接器标志: 在 Build Settings 中将-ObjC 添加到 Other Linker Flags。(CocoaPods 和 SPM 集成会自动设置此项。)