Appearance
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 Format | AdMob | AppLovin MAX | TopOn |
|---|---|---|---|
| Banner (320x50) | ✅ | ✅ | ✅ |
| MREC (300x250) | ✅ | ✅ | ✅ |
| Interstitial | ✅ | ✅ | ✅ |
| Rewarded Video | ✅ | ✅ | ✅ |
| Native | ✅ | ✅ | ✅ |
| App Open | ✅ | ✅ | ✅ |
| Rewarded Interstitial | ✅ | ✅ | ✅ |
Prerequisites
Before integrating Opera Ads through a mediation platform, ensure you have:
Opera Ads Account
- Publisher account with Opera Ads
- Application ID (format:
pub{}/ep{}/app{}) - Placement IDs for each ad unit (format:
s{})
Mediation Platform Account
- Active account on your chosen mediation platform
- App configured in the mediation dashboard
- Ad unit IDs created
Development Environment
- iOS 13.0+
- Xcode 14.0+
- CocoaPods 1.10.0+
SKAdNetwork Configuration
Add Opera's
SKAdNetworkIdentifierto your app'sInfo.plistto 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
SKAdNetworkItemsfrom 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'
endThen run:
bash
pod installStep 2: AdMob Console Configuration
Navigate to Mediation
- Go to AdMob Console → Mediation → Mediation Groups
- Select your mediation group or create a new one
Add Custom Event
- Click "Add Custom Event"
- Set Event Name:
Opera Ads - Set eCPM: Your expected eCPM (for waterfall positioning)
Configure Class Names
For each ad format, use the following adapter classes:
Ad Format Class Name Banner OpAdxAdmobBannerAdInterstitial OpAdxAdmobInterstitialAdRewarded OpAdxAdmobRewardedAdNative OpAdxAdmobNativeAdApp Open OpAdxAdmobAppOpenAdRewarded Interstitial OpAdxAdmobRewardedInterstitialAdAdd 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;
}
@endStep 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'
endThen run:
bash
pod installStep 2: AppLovin MAX Console Configuration
Navigate to MAX Dashboard
- Go to AppLovin MAX Console → Mediation → Manage Networks
Add Custom Network
- Click "Click here to add a Custom Network"
- Network Type:
SDK - Name:
Opera Ads
Configure Network Adapters
For each ad format, configure as follows:
Ad Format iOS Adapter Class Name Banner OpAdxAppLovinBannerAdapterMREC OpAdxAppLovinBannerAdapterInterstitial OpAdxAppLovinInterstitialAdapterRewarded OpAdxAppLovinRewardedAdapterNative OpAdxAppLovinNativeAdapterAdd 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;
}
@endStep 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'
endThen run:
bash
pod installStep 2: TopOn Console Configuration
Navigate to Mediation
- Go to TopOn Dashboard → App Management → Your App → Mediation
Add Custom Network
- Click "Add Ad Network"
- Select "Custom Network"
- Network Name:
Opera Ads
Configure Adapters
TopOn requires separate adapter classes for each ad format:
Ad Format Adapter Class Name Banner OpAdxToponBannerAdapterInterstitial OpAdxToponInterstitialAdapterRewarded OpAdxToponRewardVideoAdapterNative OpAdxToponNativeAdapterSplash (App Open) OpAdxToponSplashAdapterAdd 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;
}
@endStep 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
ATAPIprivacy 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 COPPAAppLovin 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 SDKAppLovin MAX:
swift
ALPrivacySettings.setDoNotSell(true) // CCPA opt-outTopOn:
swift
ATAPI.sharedInstance().setDenyPersonalizedAds(true)Troubleshooting
Issue: Opera Ads Not Showing
Symptoms: Other networks show ads but Opera Ads does not appear
Solutions:
- Verify adapter pod is installed:
pod list | grep OpAdxAdapter - Check Opera Ads configuration in mediation console
- Verify
app_idandplacement_idare correct - Check eCPM settings (waterfall position)
- Enable test mode to verify adapter integration
Issue: Adapter Initialization Failed
Symptoms: Console logs show adapter initialization errors
Solutions:
- Verify Opera Ads SDK is installed
- Check adapter version compatibility with SDK version
- Ensure
app_idformat is correct:pub{}/ep{}/app{} - Check for conflicting dependency versions
- Clean and rebuild project
Issue: Privacy Consent Not Passing
Symptoms: Ads not showing in EU due to consent issues
Solutions:
- Verify mediation platform's consent SDK is integrated
- Check consent status in mediation dashboard
- Enable debug logging to see consent values
- Ensure TCF 2.2 compliance (GDPR)
- Test with different consent scenarios
Issue: Revenue Discrepancy
Symptoms: Revenue shown in Opera dashboard differs from mediation dashboard
Solutions:
- Allow 24-48 hours for revenue to sync
- Check currency settings in both dashboards
- Verify timezone settings
- Compare impression counts between platforms
- 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 = trueTopOn:
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:
High eCPM Tiers (Top of waterfall)
- Premium demand sources
- Direct deals
- High-performing networks
Mid eCPM Tiers (Middle of waterfall)
- Opera Ads (typical position)
- Other secondary networks
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 OpAdxAdapterToponRecommended update schedule:
- Check monthly for adapter updates
- Update immediately for critical fixes
- Test thoroughly after updating
Adapter Version Compatibility
AdMob Adapter
| Adapter Version | Opera Ads SDK | AdMob SDK | Notes |
|---|---|---|---|
| 2.5.1.0 | 2.9.0 | 11.0+ | Latest |
| 2.5.0.0 | 2.8.0+ | 11.0+ | Stable |
| 2.4.0.0 | 2.7.0+ | 10.0+ | Legacy |
AppLovin MAX Adapter
| Adapter Version | Opera Ads SDK | MAX SDK | Notes |
|---|---|---|---|
| 2.5.1.0 | 2.9.0 | 13.0+ | Latest |
| 2.5.0.0 | 2.8.0+ | 12.0+ | Stable |
TopOn Adapter
| Adapter Version | Opera Ads SDK | TopOn SDK | Notes |
|---|---|---|---|
| 2.8.1.0 | 2.9.0 | 6.5.12+ | Latest |
| 2.7.0.0 | 2.7.0+ | 6.5.12+ | Stable |
| 2.4.0.0 | 2.4.0+ | 6.4.17+ | Legacy |
Support
Documentation
Sample Code
- AdMob Demo:
/Demo/AdmobAdapter/ - AppLovin Demo:
/Demo/ApplovinAdapter/ - TopOn Demo:
/Demo/ToponAdapter/
Contact
- Technical Support: Contact Opera Ads Support
- Adapter Issues: GitHub Issues
- Publisher Portal: https://publisher.opera.com
Document Version: 2.9.0 Last Updated: 2026-03-24 SDK Version: 2.9.0
