Yandex.Ads Network Integration in Mobile Application
Yandex Mobile Ad Blocks (YandexMobileAds SDK) — one of few advertising revenue sources that stably works for Russian-speaking audience after 2022. Fill rate at Yandex in Russia is higher than AdMob for same traffic, especially in utilities, news and games categories.
SDK Pitfalls
Yandex SDK version 7.x redesigned initialization: now explicit MobileAds.initialize(context) in Application.onCreate() is required, not lazy initialization on first request. Old pattern works, but first 2–3 server requests pass with ~800 ms delay — visible on time-to-first-ad metric.
On iOS similar story: YMAMobileAds.initializeSdk() must be called in applicationDidFinishLaunching, before any UI operations. If initialization happens later (for example, inside lazy var), first banners don't show on cold start — and this is not fixed in Crashlytics, just silent miss.
Native ads (YMANativeAd) require mandatory adContainer and bind(with:) call before display. If binding didn't complete — YMANativeAdViewProtocol doesn't render, place stays empty. This is typical error when using native ads in UITableViewCell: on cell reuse must explicitly unbind previous nativeAd via unbind().
How We Connect
Android dependencies:
implementation 'com.yandex.android:mobileads:7.5.0'
// If mediation via AdMob needed
implementation 'com.yandex.ads.adapters:admob:7.5.0.0'
iOS (CocoaPods / SPM):
pod 'YandexMobileAds', '~> 7.5'
For Android important to add meta-tag in AndroidManifest.xml with partner identifier — without it ads don't load in production, only test ads. Common mistake: developer tests on test-ID, all works, but in release — zero impressions.
Formats and Implementation Specifics
Sticky-banner (YMAAdSize.stickySize(withContainerWidth:)) — adaptive format that auto-selects height for container width. Don't use fixed 320×50 — Yandex supports it, but adaptive banner fill rate is about 15–20% higher by our observations.
Rewarded differs from other networks in that rewardDidLoad event fires before showing, and reward itself passed in didReward(_ reward:). If reward logic tied to dismiss event — get situation where user closed ad early but reward already awarded.
Interstitial — separate YMAInterstitialAd instance for each show. Reusing one object for multiple shows — undefined behavior that breaks on iOS 16+ with EXC_BAD_ACCESS on repeat show() call.
Integration Stages
- Creating ad block in Yandex Partner interface, getting
blockID - Adding SDK and initializing setup in Application/AppDelegate
- Implementing formats with correct lifecycle hooks
- GDPR/consent —
YMAUserConsentfor EU users - Testing with demo-blockID (
R-M-DEMO-*), then with real blocks - Monitoring fill rate and RPM in Yandex Partner cabinet
Timelines: single format — 1 day, full integration of all formats with correct lifecycle hooks — 2–3 days. Cost calculated after discussing scope of work.







