Skip to content

Opera Ads iOS SDK - Mediation Integration

Overview

The Opera Ads iOS SDK can be integrated with major mediation platforms through custom adapters. This allows you to manage Opera Ads alongside other ad networks in your mediation waterfall or bidding setup.

Supported Mediation Platforms

  • Google AdMob - Custom Event Adapter
  • AppLovin MAX - Custom Network Adapter
  • TopOn (AnyThinkAds) - Custom Adapter

Supported Ad Formats

All three mediation platforms support the following ad formats:

Ad FormatAdMobAppLovin MAXTopOn
Banner (320x50)
MREC (300x250)
Interstitial
Rewarded Video
Native
App Open
Rewarded Interstitial

Prerequisites

Before integrating Opera Ads through a mediation platform, ensure you have:

  1. Opera Ads Account

    • Publisher account with Opera Ads
    • Application ID (format: pub{}/ep{}/app{})
    • Placement IDs for each ad unit (format: s{})
  2. Mediation Platform Account

    • Active account on your chosen mediation platform
    • App configured in the mediation dashboard
    • Ad unit IDs created
  3. Development Environment

    • iOS 13.0+
    • Xcode 14.0+
    • CocoaPods 1.10.0+
  4. SKAdNetwork Configuration

    Add Opera's SKAdNetworkIdentifier to your app's Info.plist to enable ad attribution:

    xml
    <key>SKAdNetworkItems</key>
    <array>
        <dict>
            <key>SKAdNetworkIdentifier</key>
            <string>a2p9lx4jpn.skadnetwork</string>
        </dict>
        <!-- Add other ad network identifiers here -->
    </array>

    Important: Without this configuration, SKAdNetwork attribution for Opera Ads will not work. If you already have SKAdNetworkItems from other ad networks, simply add Opera's identifier to the existing array.


Google AdMob Integration

Step 1: Install Dependencies

Add to your Podfile:

ruby
platform :ios, '13.0'

target 'YourApp' do
  use_frameworks!

  # Google Mobile Ads SDK
  pod 'Google-Mobile-Ads-SDK', '~> 11.0'

  # Opera Ads SDK
  pod 'OpAdxSdk', '~> 2.9.0'

  # Opera Ads AdMob Adapter
  pod 'OpAdxAdapterAdmob', '~> 2.5.1.0'
end

Then run:

bash
pod install

Step 2: AdMob Console Configuration

  1. Navigate to Mediation

    • Go to AdMob Console → Mediation → Mediation Groups
    • Select your mediation group or create a new one
  2. Add Custom Event

    • Click "Add Custom Event"
    • Set Event Name: Opera Ads
    • Set eCPM: Your expected eCPM (for waterfall positioning)
  3. Configure Class Names

    For each ad format, use the following adapter classes:

    Ad FormatClass Name
    BannerOpAdxAdmobBannerAd
    InterstitialOpAdxAdmobInterstitialAd
    RewardedOpAdxAdmobRewardedAd
    NativeOpAdxAdmobNativeAd
    App OpenOpAdxAdmobAppOpenAd
    Rewarded InterstitialOpAdxAdmobRewardedInterstitialAd
  4. Add Custom Parameters

    In the "Parameter" field, enter your Opera Ads configuration in JSON format:

    json
    {
      "app_id": "pub13423013211200/ep13423013211584/app14170937163904",
      "placement_id": "s14170965187264"
    }

Step 3: Initialize SDKs

Swift:

swift
import GoogleMobileAds
import OpAdxSdk

@main
class AppDelegate: UIResponder, UIApplicationDelegate {

    func application(_ application: UIApplication,
                     didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

        // Initialize Google Mobile Ads SDK
        GADMobileAds.sharedInstance().start { status in
            print("AdMob SDK initialized")
        }

        // Opera Ads SDK will be auto-initialized by the adapter
        // No manual initialization required

        return true
    }
}

Objective-C:

objective-c
#import <GoogleMobileAds/GoogleMobileAds.h>
#import <OpAdxSdk/OpAdxSdk.h>

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application
    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

    // Initialize Google Mobile Ads SDK
    [[GADMobileAds sharedInstance] startWithCompletionHandler:^(GADInitializationStatus *status) {
        NSLog(@"AdMob SDK initialized");
    }];

    // Opera Ads SDK will be auto-initialized by the adapter
    // No manual initialization required

    return YES;
}

@end

Step 4: Load Ads Through AdMob

Banner Ad Example (Swift):

swift
import GoogleMobileAds

class BannerViewController: UIViewController {
    var bannerView: GADBannerView!

    override func viewDidLoad() {
        super.viewDidLoad()

        // Create banner view
        bannerView = GADBannerView(adSize: GADAdSizeMediumRectangle)
        bannerView.adUnitID = "ca-app-pub-xxxxx/xxxxx"  // Your AdMob Ad Unit ID
        bannerView.rootViewController = self
        bannerView.delegate = self

        // Load ad through AdMob mediation
        bannerView.load(GADRequest())

        // Add to view
        view.addSubview(bannerView)
    }
}

extension BannerViewController: GADBannerViewDelegate {
    func bannerViewDidReceiveAd(_ bannerView: GADBannerView) {
        print("Banner ad loaded (may be from Opera Ads)")
    }

    func bannerView(_ bannerView: GADBannerView, didFailToReceiveAdWithError error: Error) {
        print("Banner ad failed: \(error.localizedDescription)")
    }
}

Interstitial Ad Example (Swift):

swift
import GoogleMobileAds

class InterstitialViewController: UIViewController {
    var interstitial: GADInterstitialAd?

    func loadInterstitial() {
        GADInterstitialAd.load(
            withAdUnitID: "ca-app-pub-xxxxx/xxxxx",
            request: GADRequest()
        ) { [weak self] ad, error in
            if let error = error {
                print("Failed to load interstitial: \(error.localizedDescription)")
                return
            }
            self?.interstitial = ad
            self?.interstitial?.fullScreenContentDelegate = self
            print("Interstitial loaded (may be from Opera Ads)")
        }
    }

    func showInterstitial() {
        if let interstitial = interstitial {
            interstitial.present(fromRootViewController: self)
        }
    }
}

extension InterstitialViewController: GADFullScreenContentDelegate {
    func adDidDismissFullScreenContent(_ ad: GADFullScreenPresentingAd) {
        print("Interstitial dismissed")
        loadInterstitial()  // Preload next ad
    }
}

AdMob Adapter Features

  • Auto-Initialization: Opera Ads SDK is automatically initialized by the adapter
  • Privacy Support: Automatically reads GDPR, COPPA, and CCPA consent from AdMob
  • No Code Changes: Works seamlessly with existing AdMob integration
  • Waterfall Support: Positioned in waterfall based on eCPM settings
  • Bidding Support: Compatible with AdMob bidding (requires additional setup)

AppLovin MAX Integration

Step 1: Install Dependencies

Add to your Podfile:

ruby
platform :ios, '13.0'

target 'YourApp' do
  use_frameworks!

  # AppLovin MAX SDK
  pod 'AppLovinSDK', '~> 13.0'

  # Opera Ads SDK
  pod 'OpAdxSdk', '~> 2.9.0'

  # Opera Ads AppLovin Adapter
  pod 'OpAdxAdapterAppLovin', '~> 2.5.1.0'
end

Then run:

bash
pod install

Step 2: AppLovin MAX Console Configuration

  1. Navigate to MAX Dashboard

    • Go to AppLovin MAX Console → Mediation → Manage Networks
  2. Add Custom Network

    • Click "Click here to add a Custom Network"
    • Network Type: SDK
    • Name: Opera Ads
  3. Configure Network Adapters

    For each ad format, configure as follows:

    Ad FormatiOS Adapter Class Name
    BannerOpAdxAppLovinBannerAdapter
    MRECOpAdxAppLovinBannerAdapter
    InterstitialOpAdxAppLovinInterstitialAdapter
    RewardedOpAdxAppLovinRewardedAdapter
    NativeOpAdxAppLovinNativeAdapter
  4. Add Custom Parameters

    For each ad unit, set the following custom parameters:

    app_id=pub13423013211200/ep13423013211584/app14170937163904
    placement_id=s14170965187264

Step 3: Initialize SDKs

Swift:

swift
import AppLovinSDK
import OpAdxSdk

@main
class AppDelegate: UIResponder, UIApplicationDelegate {

    func application(_ application: UIApplication,
                     didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

        // Initialize AppLovin SDK
        ALSdk.shared().mediationProvider = "max"
        ALSdk.shared().initializeSdk { configuration in
            print("AppLovin MAX SDK initialized")
        }

        // Opera Ads SDK will be auto-initialized by the adapter

        return true
    }
}

Objective-C:

objective-c
#import <AppLovinSDK/AppLovinSDK.h>
#import <OpAdxSdk/OpAdxSdk.h>

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application
    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

    // Initialize AppLovin SDK
    [[ALSdk shared] setMediationProvider:@"max"];
    [[ALSdk shared] initializeSdkWithCompletionHandler:^(ALSdkConfiguration *configuration) {
        NSLog(@"AppLovin MAX SDK initialized");
    }];

    // Opera Ads SDK will be auto-initialized by the adapter

    return YES;
}

@end

Step 4: Load Ads Through AppLovin MAX

Banner Ad Example (Swift):

swift
import AppLovinSDK

class BannerViewController: UIViewController {
    var bannerAdView: MAAdView!

    override func viewDidLoad() {
        super.viewDidLoad()

        // Create banner ad view
        bannerAdView = MAAdView(adUnitIdentifier: "YOUR_AD_UNIT_ID")
        bannerAdView.delegate = self

        // Set background color
        bannerAdView.backgroundColor = .clear

        // Load ad
        bannerAdView.loadAd()

        // Add to view
        view.addSubview(bannerAdView)
    }
}

extension BannerViewController: MAAdViewAdDelegate {
    func didLoad(_ ad: MAAd) {
        print("Banner loaded (may be from Opera Ads)")
    }

    func didFailToLoadAd(forAdUnitIdentifier adUnitIdentifier: String, withError error: MAError) {
        print("Banner failed to load: \(error.message)")
    }
}

Interstitial Ad Example (Swift):

swift
import AppLovinSDK

class InterstitialViewController: UIViewController {
    var interstitialAd: MAInterstitialAd!

    override func viewDidLoad() {
        super.viewDidLoad()

        interstitialAd = MAInterstitialAd(adUnitIdentifier: "YOUR_AD_UNIT_ID")
        interstitialAd.delegate = self

        // Load ad
        interstitialAd.load()
    }

    func showInterstitial() {
        if interstitialAd.isReady {
            interstitialAd.show()
        }
    }
}

extension InterstitialViewController: MAAdDelegate {
    func didLoad(_ ad: MAAd) {
        print("Interstitial loaded (may be from Opera Ads)")
    }

    func didDisplay(_ ad: MAAd) {
        print("Interstitial displayed")
    }

    func didHide(_ ad: MAAd) {
        print("Interstitial dismissed")
        interstitialAd.load()  // Preload next ad
    }
}

AppLovin MAX Adapter Features

  • Banner Sizes: Supports standard banner (320x50) and MREC (300x250)
  • Auto-Initialization: Opera Ads SDK initialized automatically
  • Privacy Support: Reads consent from AppLovin MAX privacy APIs
  • Revenue Tracking: Accurate revenue reporting through MAX dashboard
  • Bidding Support: Compatible with MAX bidding (In-App Bidding)

TopOn (AnyThinkAds) Integration

Step 1: Install Dependencies

Add to your Podfile:

ruby
platform :ios, '13.0'

target 'YourApp' do
  use_frameworks!

  # TopOn SDK
  pod 'AnyThinkiOS', '~> 6.5.12'

  # Opera Ads SDK
  pod 'OpAdxSdk', '~> 2.9.0'

  # Opera Ads TopOn Adapter
  pod 'OpAdxAdapterTopon', '~> 2.8.1.0'
end

Then run:

bash
pod install

Step 2: TopOn Console Configuration

  1. Navigate to Mediation

    • Go to TopOn Dashboard → App Management → Your App → Mediation
  2. Add Custom Network

    • Click "Add Ad Network"
    • Select "Custom Network"
    • Network Name: Opera Ads
  3. Configure Adapters

    TopOn requires separate adapter classes for each ad format:

    Ad FormatAdapter Class Name
    BannerOpAdxToponBannerAdapter
    InterstitialOpAdxToponInterstitialAdapter
    RewardedOpAdxToponRewardVideoAdapter
    NativeOpAdxToponNativeAdapter
    Splash (App Open)OpAdxToponSplashAdapter
  4. Add Network Configuration

    For each ad unit, configure the custom data in JSON format:

    json
    {
      "app_id": "pub13423013211200/ep13423013211584/app14170937163904",
      "placement_id": "s14170965187264",
      "ios_app_id": "1444253128"
    }

Step 3: Initialize SDKs

Swift:

swift
import AnyThinkSDK
import OpAdxSdk

@main
class AppDelegate: UIResponder, UIApplicationDelegate {

    func application(_ application: UIApplication,
                     didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

        // Initialize TopOn SDK
        ATAPI.initSDK(
            withAppID: "YOUR_TOPON_APP_ID",
            appKey: "YOUR_TOPON_APP_KEY"
        ) { error in
            if let error = error {
                print("TopOn initialization failed: \(error)")
            } else {
                print("TopOn SDK initialized")
            }
        }

        // Opera Ads SDK will be auto-initialized by the adapter

        return true
    }
}

Objective-C:

objective-c
#import <AnyThinkSDK/AnyThinkSDK.h>
#import <OpAdxSdk/OpAdxSdk.h>

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application
    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

    // Initialize TopOn SDK
    [[ATAPI sharedInstance] initSDKWithAppID:@"YOUR_TOPON_APP_ID"
                                      appKey:@"YOUR_TOPON_APP_KEY"
                           completionHandler:^(NSError *error) {
        if (error) {
            NSLog(@"TopOn initialization failed: %@", error);
        } else {
            NSLog(@"TopOn SDK initialized");
        }
    }];

    // Opera Ads SDK will be auto-initialized by the adapter

    return YES;
}

@end

Step 4: Load Ads Through TopOn

Banner Ad Example (Swift):

swift
import AnyThinkBanner

class BannerViewController: UIViewController {
    var bannerView: ATBannerView!

    override func viewDidLoad() {
        super.viewDidLoad()

        // Create banner view
        bannerView = ATBannerView(placementID: "YOUR_PLACEMENT_ID", frame: CGRect(x: 0, y: 0, width: 320, height: 50))
        bannerView.delegate = self

        // Load ad
        bannerView.loadAD()

        // Add to view
        view.addSubview(bannerView)
    }
}

extension BannerViewController: ATBannerDelegate {
    func bannerView(_ bannerView: ATBannerView, didLoadAdWith placement: ATPlacementModel) {
        print("Banner loaded (may be from Opera Ads)")
    }

    func bannerView(_ bannerView: ATBannerView, didFailToLoadAdWith error: Error) {
        print("Banner failed: \(error.localizedDescription)")
    }
}

Interstitial Ad Example (Swift):

swift
import AnyThinkInterstitial

class InterstitialViewController: UIViewController {
    let placementId = "YOUR_PLACEMENT_ID"

    func loadInterstitial() {
        ATInterstitial.sharedInstance().loadAD(placementId, delegate: self)
    }

    func showInterstitial() {
        if ATInterstitial.sharedInstance().interstitialReady(forPlacementID: placementId) {
            ATInterstitial.sharedInstance().show(placementId, in: self)
        }
    }
}

extension InterstitialViewController: ATInterstitialDelegate {
    func interstitialDidLoad(forPlacementID placementID: String) {
        print("Interstitial loaded (may be from Opera Ads)")
    }

    func interstitialDidClose(forPlacementID placementID: String) {
        print("Interstitial closed")
        loadInterstitial()  // Preload next ad
    }
}

TopOn Adapter Features

  • Multiple SDK Versions: Supports both legacy (6.4.x) and current (6.5.x+) TopOn SDK versions
  • Splash Ads: Supports App Open ads through Splash format
  • Auto-Initialization: SDK initialized automatically through adapter
  • Privacy Support: Reads TopOn's privacy settings
  • Custom Parameters: Flexible configuration through JSON parameters

Privacy & Compliance

All Opera Ads mediation adapters automatically handle privacy compliance:

GDPR (European Union)

The adapters automatically read GDPR consent from the mediation platform:

  • AdMob: Reads from GADMobileAds.sharedInstance().requestConfiguration
  • AppLovin MAX: Reads from ALPrivacySettings
  • TopOn: Reads from ATAPI privacy settings

No additional configuration required - consent is passed automatically to Opera Ads SDK.

COPPA (Children's Online Privacy Protection Act)

Set COPPA compliance through your mediation platform:

AdMob:

swift
let request = GADRequest()
request.tag(forChildDirectedTreatment: 1)  // 1 = subject to COPPA

AppLovin MAX:

swift
ALPrivacySettings.setIsAgeRestrictedUser(true)

TopOn:

swift
ATAPI.sharedInstance().setDataConsentSet(ATDataConsentSet.child)

CCPA / US Privacy

Set US Privacy string through your mediation platform:

AdMob:

swift
// Handled by Google UMP SDK

AppLovin MAX:

swift
ALPrivacySettings.setDoNotSell(true)  // CCPA opt-out

TopOn:

swift
ATAPI.sharedInstance().setDenyPersonalizedAds(true)

Troubleshooting

Issue: Opera Ads Not Showing

Symptoms: Other networks show ads but Opera Ads does not appear

Solutions:

  1. Verify adapter pod is installed: pod list | grep OpAdxAdapter
  2. Check Opera Ads configuration in mediation console
  3. Verify app_id and placement_id are correct
  4. Check eCPM settings (waterfall position)
  5. Enable test mode to verify adapter integration

Issue: Adapter Initialization Failed

Symptoms: Console logs show adapter initialization errors

Solutions:

  1. Verify Opera Ads SDK is installed
  2. Check adapter version compatibility with SDK version
  3. Ensure app_id format is correct: pub{}/ep{}/app{}
  4. Check for conflicting dependency versions
  5. Clean and rebuild project

Symptoms: Ads not showing in EU due to consent issues

Solutions:

  1. Verify mediation platform's consent SDK is integrated
  2. Check consent status in mediation dashboard
  3. Enable debug logging to see consent values
  4. Ensure TCF 2.2 compliance (GDPR)
  5. Test with different consent scenarios

Issue: Revenue Discrepancy

Symptoms: Revenue shown in Opera dashboard differs from mediation dashboard

Solutions:

  1. Allow 24-48 hours for revenue to sync
  2. Check currency settings in both dashboards
  3. Verify timezone settings
  4. Compare impression counts between platforms
  5. Contact support if discrepancy persists

Testing Mediation Integration

Test Mode Configuration

AdMob:

swift
// Use AdMob test device IDs
GADMobileAds.sharedInstance().requestConfiguration.testDeviceIdentifiers = ["YOUR_TEST_DEVICE_ID"]

AppLovin MAX:

swift
// Enable test mode
ALSdk.shared().settings.isTestModeEnabled = true

TopOn:

swift
// Enable debug mode
ATAPI.setLogEnabled(true)

Verify Opera Ads Is Serving

Check the mediation platform's debug console or logs:

AdMob: Mediation Test Suite shows which network served AppLovin MAX: MAX Mediation Debugger shows network waterfall TopOn: Debug log shows adapter calls

Test Checklist

  • [ ] Adapter pod is installed and linked
  • [ ] Opera Ads configuration is set in mediation console
  • [ ] App ID and Placement ID are correct
  • [ ] Test ads are showing from Opera Ads
  • [ ] Privacy consent is working correctly
  • [ ] Ad callbacks are firing properly
  • [ ] Revenue is tracking in both dashboards

Best Practices

Waterfall Positioning

Position Opera Ads in your waterfall based on historical eCPM:

  1. High eCPM Tiers (Top of waterfall)

    • Premium demand sources
    • Direct deals
    • High-performing networks
  2. Mid eCPM Tiers (Middle of waterfall)

    • Opera Ads (typical position)
    • Other secondary networks
  3. Low eCPM Tiers (Bottom of waterfall)

    • Backfill networks
    • House ads

Refresh Rates

Important: Auto-refresh is disabled in Opera Ads mediation adapters. Use the mediation platform's refresh settings:

  • AdMob: Set refresh in AdMob console (recommended: 30-60 seconds)
  • AppLovin MAX: Configure in MAX dashboard
  • TopOn: Set in TopOn console

Adapter Updates

Keep adapters updated for best performance:

bash
# Check for adapter updates
pod outdated

# Update specific adapter
pod update OpAdxAdapterAdmob
pod update OpAdxAdapterAppLovin
pod update OpAdxAdapterTopon

Recommended update schedule:

  • Check monthly for adapter updates
  • Update immediately for critical fixes
  • Test thoroughly after updating

Adapter Version Compatibility

AdMob Adapter

Adapter VersionOpera Ads SDKAdMob SDKNotes
2.5.1.02.9.011.0+Latest
2.5.0.02.8.0+11.0+Stable
2.4.0.02.7.0+10.0+Legacy

AppLovin MAX Adapter

Adapter VersionOpera Ads SDKMAX SDKNotes
2.5.1.02.9.013.0+Latest
2.5.0.02.8.0+12.0+Stable

TopOn Adapter

Adapter VersionOpera Ads SDKTopOn SDKNotes
2.8.1.02.9.06.5.12+Latest
2.7.0.02.7.0+6.5.12+Stable
2.4.0.02.4.0+6.4.17+Legacy

Support

Documentation

Sample Code

  • AdMob Demo: /Demo/AdmobAdapter/
  • AppLovin Demo: /Demo/ApplovinAdapter/
  • TopOn Demo: /Demo/ToponAdapter/

Contact


Document Version: 2.9.0 Last Updated: 2026-03-24 SDK Version: 2.9.0