Using Adaptive Banners in iOS

If you are using MAS 4.2 or above, the option to use adaptive banners in iOS is now available. By default the option is deactivated, but can easily be activated at the code level. Please follow the guide below for implementation.

Turning On Adaptive Banners

To activate adaptive banners, add the following code to the script you use to manage your ads:

For Swift

let config = Yodo1MasAdBuildConfig.instance()
config.enableAdaptiveBanner = true
Yodo1Mas.sharedInstance().setAdBuildConfig(config)

For Objective C

Yodo1MasAdBuildConfig * config = [Yodo1MasAdBuildConfig instance];
config.enableAdaptiveBanner = YES;
[[Yodo1Mas sharedInstance] setAdBuildConfig:config];

[[Yodo1Mas sharedInstance] initWithAppKey:appKey successful:^{
        
} fail:^(NSError * _Nonnull error) {
        
}];

A Note On Adaptive Banners

Please note that presently, MAS Adaptive banners do not have sizing controls. As a result, if you choose to use them, please make sure your banner placements are well away from any controls or other UI elements. Failure to do so may lead to a ban from Google Play.

Updated on September 8, 2021

Was this article helpful?

Related Articles