Skip to content

Commit

Permalink
GoogleAdManager/8.13.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
prod-applovin-deploy committed Feb 21, 2022
1 parent d483578 commit 12b7f97
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ s.authors =
'AppLovin Corporation' => '[email protected]'
}
s.name = 'AppLovinMediationGoogleAdManagerAdapter'
s.version = '8.13.0.5'
s.version = '8.13.0.6'
s.platform = :ios, '9.0'
s.summary = 'Google Ad Manager adapter used for mediation with the AppLovin MAX SDK'
s.homepage = "https://github.com/CocoaPods/Specs/search?o=desc&q=#{s.name}&s=indexed"
Expand Down
3 changes: 3 additions & 0 deletions GoogleAdManager/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 8.13.0.6
* 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.5
* Add support for custom [AdChoices placements](https://developers.google.com/admob/ios/api/reference/Enums/GADAdChoicesPosition.html), which publishers can set by calling `setLocalExtraParameterForKey("gam_ad_choices_placement", GADAdChoicesPosition)` on the `MANativeAdLoader` instance.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#import "ALGoogleAdManagerMediationAdapter.h"
#import <GoogleMobileAds/GoogleMobileAds.h>

#define ADAPTER_VERSION @"8.13.0.5"
#define ADAPTER_VERSION @"8.13.0.6"

@interface ALGoogleAdManagerInterstitialDelegate : NSObject<GADFullScreenContentDelegate>
@property (nonatomic, weak) ALGoogleAdManagerMediationAdapter *parentAdapter;
Expand Down Expand Up @@ -411,7 +411,7 @@ - (void)loadAdViewAdForParameters:(id<MAAdapterResponseParameters>)parameters
GADAdSize adSize = [self adSizeFromAdFormat: adFormat withServerParameters: parameters.serverParameters];
self.adView = [[GAMBannerView alloc] initWithAdSize: adSize];
self.adView.frame = CGRectMake(0, 0, adSize.size.width, adSize.size.height);
self.adView.adUnitID = parameters.thirdPartyAdPlacementIdentifier;
self.adView.adUnitID = placementIdentifier;
self.adView.rootViewController = [ALUtils topViewControllerFromKeyWindow];
self.adViewAdapterDelegate = [[ALGoogleAdManagerAdViewDelegate alloc] initWithParentAdapter: self
adFormat: adFormat
Expand Down Expand Up @@ -906,12 +906,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
{
Expand Down

0 comments on commit 12b7f97

Please sign in to comment.