跳转到主要内容

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.

有关 CloudX 控制台映射和 Google 侧设置,请参阅 Google Waterfall 竞价方指南。本页仅说明 iOS 特定的集成细节。 Google Waterfall 适配器支持横幅 (320×50)中矩形 (300×250) 广告格式。此适配器不支持插屏和激励广告。

安装

CocoaPods

Podfile
pod 'CloudXGoogleWaterfallAdapter', '~> 3.4.2'
pod install --repo-update

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

手动安装

  1. Releases 下载 CloudXGoogleWaterfallAdapter.xcframework.zip
  2. 解压并将 CloudXGoogleWaterfallAdapter.xcframework 拖入您的 Xcode 项目
  3. 手动添加 Google Mobile Ads SDK(Google-Mobile-Ads-SDK 12.14.0)。

Info.plist 配置

Google 应用标识符(必需)

Google Mobile Ads SDK 需要在 Info.plist 中配置您的 AdMob 应用 ID。否则应用将在启动时崩溃:
Info.plist
<key>GADApplicationIdentifier</key>
<string>ca-app-pub-XXXXXXXXXXXXXXXX~YYYYYYYYYY</string>
请将该值替换为您在 AdMob 控制台中的应用 ID。

SKAdNetwork IDs(iOS 14.5+ 必需)

添加 Google 的 SKAdNetwork 标识符,以便 Google 归因安装。Google 的主标识符为:
Info.plist
<key>SKAdNetworkItems</key>
<array>
    <dict>
        <key>SKAdNetworkIdentifier</key>
        <string>cstr6suwn9.skadnetwork</string>
    </dict>
    <!-- 添加完整的 Google Mobile Ads SKAdNetwork 列表 -->
</array>
Google 在其 Google Mobile Ads 文档 中发布了完整且最新的 SKAdNetwork 标识符列表。请添加完整列表以最大化归因覆盖率。

App Tracking Transparency(iOS 14+)

Info.plist
<key>NSUserTrackingUsageDescription</key>
<string>此标识符将用于向您投放个性化广告。</string>

项目配置

链接器标志: 在 Build Settings 中将 -ObjC 添加到 Other Linker Flags。(CocoaPods 和 SPM 集成会自动设置此项。)

支持

如需支持,请联系 mobile@cloudx.io