Select platform: [Android](https://developers.google.com/ad-manager/mobile-ads-sdk/android/next-gen/mediation/tencent "View this page for the Android platform docs.") [iOS](https://developers.google.com/ad-manager/mobile-ads-sdk/ios/mediation/tencent "View this page for the iOS platform docs.") [Unity](https://developers.google.com/ad-manager/mobile-ads-sdk/unity/mediation/tencent "View this page for the Unity platform docs.") [Flutter](https://developers.google.com/ad-manager/mobile-ads-sdk/flutter/mediation/tencent "View this page for the Flutter platform docs.") [Android (Legacy)](https://developers.google.com/ad-manager/mobile-ads-sdk/android/mediation/tencent "View this page for the Android (Legacy) platform docs.")

<br />

This guide is intended for publishers who are interested in using Google
Mobile Ads mediation with **Tencent GDT**. It walks
through the setup of a mediation adapter to work with your current iOS app
and the configuration of additional settings.

| Tencent GDT Resources |
|---|
| [Documentation](http://e.qq.com/dev/#index) |
| [SDK](http://imgcache.qq.com/qzone/biz/gdt/dev/sdk/ios/release/GDT_iOS_SDK.zip) |
| [Adapter](http://imgcache.qq.com/qzone/biz/gdt/dev/sdk/ios/release/GDT_iOS_AdMobAdapter.zip) |
| [Customer support](mailto:GDTLM@tencent.com) |

## Prerequisites

- An iOS app with Google Mobile Ads SDK integrated. (If you don't
  have one, see [Get Started](https://developers.google.com/ad-manager/mobile-ads-sdk/ios/quick-start).)

- A Google Ad Manager account with [Mediation for mobile
  apps](https://support.google.com/admanager/answer/6272813) configured.

## Add Tencent GDT to your project

Integrate ads into your app the same as before. To integrate
non-interstitial ads (banner size, leaderboard size, and so on),
see [Banner Ads](https://developers.google.com/ad-manager/mobile-ads-sdk/ios/banner). To integrate
interstitial ads (full-screen ads that mask all other content),
see [Interstitial Ads](https://developers.google.com/ad-manager/mobile-ads-sdk/ios/interstitial).

The following steps change your ad placement into a mediation
placement that can show ads from multiple networks.

1. Download the adapter and SDK for Tencent GDT from the
   [resources above](https://developers.google.com/ad-manager/mobile-ads-sdk/ios/mediation/tencent#resources).

2. Add the downloaded network adapter/SDK in Xcode: right-click
   on your project and click **Add Files to <var class="readonly" translate="no">project</var>**.

3. Include any frameworks, compiler flags, or linker flags that Tencent GDT
   require. There's no need to write additional code. Mediation invokes the
   Tencent GDT adapter and SDK as necessary to create ads.

### Set up event notification

To be notified of ad lifecycle events like impressions, you can implement
a `GADBannerViewDelegate`. When using mediation, this delegate is
automatically notified of events from Tencent GDT. For example, impressions
from any ad network are reported through the `adViewDidReceiveAd:` method of
`GADBannerViewDelegate`.

### Check the value of adNetworkClassName

You can optionally check the `adNetworkClassName` property on
`GAMBannerView`, which returns the ad network class
name of the ad network that fetched the current banner once the
`adViewDidReceiveAd` callback is called:

### Swift

    func adViewDidReceiveAd(_ bannerView: GAMBannerView) {
      print("Banner adapter class name: \(bannerView.adNetworkClassName)")
    }

### Objective-C

    - (void)adViewDidReceiveAd:(GAMBannerView *)bannerView {
      NSLog(@"Banner adapter class name: %@", bannerView.adNetworkClassName);
    }

Similarly, for interstitials, check the `adNetworkClassName` property
on `GAMInterstitialAd` inside `interstitialDidReceiveAd`:

### Swift

    func interstitialDidReceiveAd(_ ad: GAMInterstitialAd) {
      print("Interstitial adapter class name: \(ad.adNetworkClassName)")
    }

### Objective-C

    - (void)interstitialDidReceiveAd:(GAMInterstitialAd *)interstitial {
      NSLog(@"Interstitial adapter class name: %@", interstitial.adNetworkClassName);
    }

For ads fetched through [custom events](https://developers.google.com/ad-manager/mobile-ads-sdk/ios/custom-events), it returns `GADMAdapterCustomEvents`.

<br />