diff --git a/Google/AppLovinMediationGoogleAdapter.podspec b/Google/AppLovinMediationGoogleAdapter.podspec index 3e02e1ee2f..21e229ab53 100644 --- a/Google/AppLovinMediationGoogleAdapter.podspec +++ b/Google/AppLovinMediationGoogleAdapter.podspec @@ -5,7 +5,7 @@ s.authors = 'AppLovin Corporation' => 'devsupport@applovin.com' } s.name = 'AppLovinMediationGoogleAdapter' -s.version = '8.13.0.6' +s.version = '8.13.0.7' s.platform = :ios, '9.0' s.summary = 'Google adapter used for mediation with the AppLovin MAX SDK' s.homepage = "https://github.com/CocoaPods/Specs/search?o=desc&q=#{s.name}&s=indexed" diff --git a/Google/CHANGELOG.md b/Google/CHANGELOG.md index 230cac87a0..37f7aec6d0 100644 --- a/Google/CHANGELOG.md +++ b/Google/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## 8.13.0.7 +* Add support for sending ad size information for adview ads. This value can be retrieved in the `didLoad()` callback using the `size` property from `MAAd.h` available in MAX SDK v11.2.0. + ## 8.13.0.6 * Add support for custom [AdChoices placements](https://developers.google.com/admob/ios/api/reference/Enums/GADAdChoicesPosition.html), which publishers can set by calling `setLocalExtraParameterForKey("admob_ad_choices_placement", GADAdChoicesPosition)` on the `MANativeAdLoader` instance. diff --git a/Google/GoogleAdapter/ALGoogleMediationAdapter.m b/Google/GoogleAdapter/ALGoogleMediationAdapter.m index 69da3b0eb1..1d236a4584 100644 --- a/Google/GoogleAdapter/ALGoogleMediationAdapter.m +++ b/Google/GoogleAdapter/ALGoogleMediationAdapter.m @@ -9,7 +9,7 @@ #import "ALGoogleMediationAdapter.h" #import -#define ADAPTER_VERSION @"8.13.0.6" +#define ADAPTER_VERSION @"8.13.0.7" @interface ALGoogleMediationAdapterInterstitialDelegate : NSObject @property (nonatomic, weak) ALGoogleMediationAdapter *parentAdapter; @@ -480,7 +480,7 @@ - (void)loadAdViewAdForParameters:(id)parameters GADAdSize adSize = [self adSizeFromAdFormat: adFormat withServerParameters: parameters.serverParameters]; self.adView = [[GADBannerView alloc] initWithAdSize: adSize]; self.adView.frame = (CGRect){.size = adSize.size}; - self.adView.adUnitID = parameters.thirdPartyAdPlacementIdentifier; + self.adView.adUnitID = placementIdentifier; self.adView.rootViewController = [ALUtils topViewControllerFromKeyWindow]; self.adViewAdapterDelegate = [[ALGoogleMediationAdapterAdViewDelegate alloc] initWithParentAdapter: self adFormat: adFormat @@ -996,12 +996,26 @@ - (void)bannerViewDidReceiveAd:(GADBannerView *)bannerView { [self.parentAdapter log: @"%@ ad loaded: %@", self.adFormat.label, bannerView.adUnitID]; - NSString *responseId = bannerView.responseInfo.responseIdentifier; - if ( ALSdk.versionCode >= 6150000 && [responseId al_isValidString] ) + if ( ALSdk.versionCode >= 6150000 ) { + NSMutableDictionary *extraInfo = [NSMutableDictionary dictionaryWithCapacity: 3]; + + NSString *responseId = bannerView.responseInfo.responseIdentifier; + if ( [responseId al_isValidString] ) + { + extraInfo[@"creative_id"] = responseId; + } + + CGSize adSize = bannerView.adSize.size; + if ( !CGSizeEqualToSize(CGSizeZero, adSize) ) + { + extraInfo[@"ad_width"] = @(adSize.width); + extraInfo[@"ad_height"] = @(adSize.height); + } + [self.delegate performSelector: @selector(didLoadAdForAdView:withExtraInfo:) withObject: bannerView - withObject: @{@"creative_id" : responseId}]; + withObject: extraInfo]; } else {