This guide is intended for publishers who are interested in using Google Mobile Ads mediation with AdFalcon . It walks through the setup of a mediation adapter to work with your current iOS app and the configuration of additional settings.
| Ресурсы AdFalcon |
|---|
| Документация |
| SDK |
| Адаптер |
| Служба поддержки клиентов |
Предварительные требования
Приложение для iOS со встроенным Google Mobile Ads SDK . (Если у вас его нет, см. раздел «Начало работы ».)
Аккаунт Google Ad Manager с настроенной функцией медиации для мобильных приложений .
Add AdFalcon 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 . To integrate interstitial ads (full-screen ads that mask all other content), see Interstitial Ads .
Следующие шаги преобразуют ваше рекламное размещение в посредническое, позволяющее показывать рекламу из нескольких сетей.
Загрузите адаптер и SDK для AdFalcon из указанных выше источников .
Добавьте загруженный сетевой адаптер/SDK в Xcode: щелкните правой кнопкой мыши по своему проекту и выберите «Добавить файлы в project .
Include any frameworks, compiler flags, or linker flags that AdFalcon require. There's no need to write additional code. Mediation invokes the AdFalcon adapter and SDK as necessary to create ads.
Настройка уведомлений о событиях
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 AdFalcon. For example, impressions from any ad network are reported through the adViewDidReceiveAd: method of GADBannerViewDelegate .
Проверьте значение параметра 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:
Быстрый
func adViewDidReceiveAd(_ bannerView: GAMBannerView) {
print("Banner adapter class name: \(bannerView.adNetworkClassName)")
}
Objective-C
- (void)adViewDidReceiveAd:(GAMBannerView *)bannerView {
NSLog(@"Banner adapter class name: %@", bannerView.adNetworkClassName);
}
Аналогично, для межстраничной рекламы проверьте свойство adNetworkClassName объекта GAMInterstitialAd внутри interstitialDidReceiveAd :
Быстрый
func interstitialDidReceiveAd(_ ad: GAMInterstitialAd) {
print("Interstitial adapter class name: \(ad.adNetworkClassName)")
}
Objective-C
- (void)interstitialDidReceiveAd:(GAMInterstitialAd *)interstitial {
NSLog(@"Interstitial adapter class name: %@", interstitial.adNetworkClassName);
}
GADMAdapterCustomEvents .