> ## 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 iOS SDK 的 Google Waterfall 适配器。支持 Banner、MREC、Interstitial、Rewarded、Native 和 App Open。

有关 CloudX 控制台映射和 Google 侧设置，请参阅 [Google Waterfall 竞价方指南](/zh/networks/google-waterfall)。本页仅说明 iOS 特定的集成细节。

Google Waterfall 适配器支持**横幅 (320×50)**、**中矩形 (300×250)**、**插屏**、**激励视频**、**原生广告**和 **App Open** 广告格式。

## 安装

### CocoaPods

```ruby Podfile theme={null}
pod 'CloudXGoogleWaterfallAdapter', '~> 13.6.0.0'
```

```bash theme={null}
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](https://github.com/cloudx-io/cloudx-ios/releases) 下载 `CloudXGoogleWaterfallAdapter.xcframework.zip`
2. 解压并将 `CloudXGoogleWaterfallAdapter.xcframework` 拖入您的 Xcode 项目
3. 手动添加 Google Mobile Ads SDK（`Google-Mobile-Ads-SDK 13.6.0`）。

## Info.plist 配置

### Google 应用标识符（必需）

Google Mobile Ads SDK 需要在 Info.plist 中配置您的 AdMob 应用 ID。否则应用将在启动时崩溃：

```xml Info.plist theme={null}
<key>GADApplicationIdentifier</key>
<string>ca-app-pub-XXXXXXXXXXXXXXXX~YYYYYYYYYY</string>
```

请将该值替换为您在 AdMob 控制台中的应用 ID。

### SKAdNetwork IDs（iOS 14.5+ 必需）

添加 Google 的 SKAdNetwork 标识符，以便 Google 归因安装。Google 的主标识符为：

```xml Info.plist theme={null}
<key>SKAdNetworkItems</key>
<array>
    <dict>
        <key>SKAdNetworkIdentifier</key>
        <string>cstr6suwn9.skadnetwork</string>
    </dict>
    <!-- 添加完整的 Google Mobile Ads SKAdNetwork 列表 -->
</array>
```

Google 在其 [Google Mobile Ads 文档](https://developers.google.com/admob/ios/quick-start) 中发布了完整且最新的 SKAdNetwork 标识符列表。请添加完整列表以最大化归因覆盖率。

### App Tracking Transparency（iOS 14+）

```xml Info.plist theme={null}
<key>NSUserTrackingUsageDescription</key>
<string>此标识符将用于向您投放个性化广告。</string>
```

## 项目配置

**链接器标志：** 在 Build Settings 中将 `-ObjC` 添加到 Other Linker Flags。（CocoaPods 和 SPM 集成会自动设置此项。）

## 兼容性

| 适配器版本       | 广告网络 SDK                        | 最低 CloudXCore |
| ----------- | ------------------------------- | ------------- |
| `13.6.0.0`  | Google Mobile Ads SDK `13.6.0`  | `3.5.0`       |
| `12.14.0.0` | Google Mobile Ads SDK `12.14.0` | `3.5.0`       |

当服务端下发的 CloudX 配置包含该广告网络需求时，SDK 会自动发现该适配器。无需手动注册适配器。

## 支持

如需支持，请联系 [mobile@cloudx.io](mailto:mobile@cloudx.io)
