Appearance
TopOn Mediation Integration
Supported Ad Formats
| TopOn Ad Format | Minimum required version of Opera adapter |
|---|---|
| Native | 2.0.0.0 |
| Banner | 2.0.0.0 |
| Interstitial | 2.0.0.0 |
| Rewarded | 2.0.0.0 |
| Splash (App Open) | 2.5.0.0 |
Configure Custom Ad Network in TopOn Console
Refer to Custom Network on TopOn Mediation Network Guide for detailed information.
Add Custom Ad Network
- Sign in to the TopOn Console
- Navigate to Mediation → Network → Custom Network
- Click Add Custom Network
Configure Adapter Class Names for Different Ad Formats
TopOn requires separate adapter classes for each ad format:
| Ad Format | iOS Adapter Class Name |
|---|---|
| Native | OpAdxToponNativeAdapter |
| Banner | OpAdxToponBannerAdapter |
| Interstitial | OpAdxToponInterstitialAdapter |
| Rewarded | OpAdxToponRewardVideoAdapter |
| Splash (App Open) | OpAdxToponAppOpenAdapter |
Custom Parameters
For each ad unit, configure the custom data in JSON format:
json
{
"app_id": "pub13423013211200/ep13423013211584/app14170937163904",
"slot_id": "s14170965187264",
"bundle_id": "1444253128"
}| Key | Required | Description |
|---|---|---|
app_id | Yes | Opera Ads Application ID (format: pub{}/ep{}/app{}) |
slot_id | Yes | Opera Ads Placement ID (format: s{}) |
bundle_id | Yes | Your iOS App Store ID |
Banner Size Configuration
When adding an "Ad Source" for a Banner ad unit on TopOn console, set the correct size:
- BANNER:
320x50(in DP) - MREC:
300x250(in DP)
Also, make sure Bottom Ads is enabled for Opera Ads network to be the backfill ad network for unbidded requests.
Add Dependencies
Add to your Podfile:
ruby
platform :ios, '13.0'
target 'YourApp' do
use_frameworks!
# TopOn SDK
pod 'TPNiOS', '>= 6.5.34'
# Opera Ads SDK
pod 'OpAdxSdk', '~> 2.9.1'
# Opera Ads TopOn Adapter
pod 'OpAdxAdapterTopon', '~> 2.9.1.0'
endThen run:
bash
pod installAdditional Code Required
The TopOn SDK automatically initializes the Opera Ads SDK through the adapter.
Initialize TopOn SDK
Swift:
swift
import AnyThinkSDK
@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>
@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;
}
@endPrivacy Compliance
GDPR
Please refer to GDPR. The Opera Ads SDK reads the application's consent string automatically.
COPPA
Please refer to COPPA. You can set COPPA status via the SDK init config's .coppa() builder method.
CCPA (US Privacy)
Please refer to US Privacy. You can set the CCPA status via the SDK init config's .usPrivacy() builder method.
