Integrating Yandex Mobile Mediation
Warning
Be sure to update to the latest adapter versions (Yandex Mobile Mediation and adapters for third-party mediation networks). Otherwise, errors from improper adapter integration might occur, preventing the ad from being served.
Yandex Mobile Mediation is a platform that automatically selects ads from a variety of ad networks using ML algorithms, which helps you maximize your revenue. All settings are preconfigured, so you can start using it immediately without having to set up each network individually.
If you've been using the Mobile Ads SDK with a single Yandex network, migrating to Yandex Mediation requires no code changes. You only need to preset the sections of third-party advertising networks' web interfaces.
Prerequisites
To prepare your app, follow the steps described in the next sections.
App requirements
- Use iOS 13 or higher.
- Use Xcode 16.1 or higher.
Setting up the app in your Yandex Advertising Network account
Here's how to register your app in the Yandex Advertising Network:
- Log in or register your account in the Yandex Advertising Network.
- Register your app in the Yandex Advertising Network.
Integration
There are two integration methods:
- Single build (recommended): All available adapters are connected automatically.
- Connecting individual adapters: Install the Yandex SDK and separately connect specific adapters using the appropriate packages.
You can connect all available adapters automatically using the YandexMobileAdsMediation shared mediation library. The library is adapted to work with dependency managers:
If you need static linking:
-
Set up mediation in the Yandex Advertising Network interface.
-
Add the
YandexMobileAdsMediationlibrary to your Podfile.pod 'YandexMobileAdsMediation', '7.18.0'The latest compatible version is selected automatically for each adapter.
-
In your app's Info.plist file, add the
GADApplicationIdentifierkey with yourAdMob ID. Learn more about where you can find the AdMob ID.<key>GADApplicationIdentifier</key> <string>ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy</string>
The following method is available for the external ad exchanges Mintegral, AppLovin, Google AdMob (ex. AdMob), VK Ads (ex. myTarget), and Liftoff (ex. Vungle):
- Set up mediation in the Yandex Advertising Network interface.
- In your Xcode project, add a dependency using File → Add Packages dependencies.
- Specify the URL of the repository with the Swift package:
https://github.com/yandexmobile/yandex-ads-sdk-ios.
- Go to Build Settings and add the parameter value
Other Linker Flags = -ObjCunder Linking.
- Make sure the target is linked to YandexMobileAdsPackage. If it isn't linked, go to Link Binary With Libraries and add a link to the library by clicking +.

- Select the adapters or the mediation build. In SPM, you need to enable only the adapters.

To connect individual adapters, enable the Yandex Ads SDK, then follow the specific instructions for each adapter:
- Set up mediation in the Yandex Advertising Network interface.
- Add the
YandexMobileAdslibrary to your Podfile.
pod 'YandexMobileAds', 'x.x.x' // add supported version
- Connect the required adapters separately using the appropriate libraries.