Waterfall Custom Adapter
The adapter supports custom waterfall integration for the next ad formats:
- Banner
- Interstitial
- Rewarded
- Native
Integration
In your Podfile file add the following dependency which includes the BidMachine adapter for use within AdMob platform:
target 'Target' do
project 'Project.xcodeproj'
pod 'BidMachineAdMobAdapter', '~> 3.3.0.2'
end
Initialization
The BidMachineAdMobAdapter starting 3.1.1.2 version offers robust support for waterfall integration. This integration type require to configure mediation groups in AdMob account by adding BidMachine Custom Events and Mappings.
Waterfall integration does not require BidMachineSdk initialization code, as it is triggered automatically as part of the MobileAds initialization.
However, if you need to configure additional BidMachineSdk settings, refer to the Logging and Test Mode below.
Logging and Test Mode
All parameters for BidMachine SDK must be set before starting AdMob SDK.
- Swift
- Objective-C
BidMachineSdk.shared.populate { builder in
builder
.withTestMode(true)
.withLoggingMode(true)
.withBidLoggingMode(true)
.withEventLoggingMode(true)
}
MobileAds.shared.start(completionHandler: nil)
Don't forget to remove .withTestMode()
before releasing to production!
[BidMachineSdk.shared populate:^(id<BidMachineInfoBuilderProtocol> builder) {
[builder withTestMode:YES];
[builder withLoggingMode:YES];
[builder withBidLoggingMode:YES];
[builder withEventLoggingMode:YES];
}];
[[GADMobileAds sharedInstance] startWithCompletionHandler:^(GADInitializationStatus * _Nonnull status) { }];
Don't forget to remove [builder withTestMode:];
before releasing to production!