Skip to content

Commit

Permalink
VerizonAds/2.0.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins committed Jun 27, 2022
1 parent f91f604 commit 49533ca
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VerizonAds/AppLovinMediationVerizonAdsAdapter.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ s.authors =
'AppLovin Corporation' => '[email protected]'
}
s.name = 'AppLovinMediationVerizonAdsAdapter'
s.version = '2.0.0.3'
s.version = '2.0.0.4'
s.platform = :ios, '11.0'
s.summary = 'Verizon Ads 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 VerizonAds/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 2.0.0.4
* Add support for returning the main image asset in `MANativeAd` for native ads.

## 2.0.0.3
* Add support for IAB's TCFv2 GDPR consent string. Note that you must be on the AppLovin MAX SDK v11.4.2+ and use a TCFv2-compliant framework which stores the consent string in User Defaults via the `IABTCF_TCString` key to use this feature. Yahoo will still be filtered out of the waterfall in GDPR regions if the string is not available or one of the criteria is not met.

Expand Down
10 changes: 9 additions & 1 deletion VerizonAds/VerizonAdsAdapter/ALVerizonAdsMediationAdapter.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#import <YahooAds/YahooAds.h>

// Major version number is '2' since certifying against the rebranded Yahoo SDK
#define ADAPTER_VERSION @"2.0.0.3"
#define ADAPTER_VERSION @"2.0.0.4"

/**
* Dedicated delegate object for Verizon Ads interstitial ads.
Expand Down Expand Up @@ -762,6 +762,7 @@ - (void)nativeAdDidLoad:(YASNativeAd *)nativeAd

UIView *mediaView;
CGFloat mediaContentAspectRatio = 0.0f;
MANativeAdImage *mainImage = nil;
id<YASNativeVideoComponent> videoComponent = (id<YASNativeVideoComponent>)[nativeAd component: @"video"];
id<YASNativeImageComponent> mainImageComponent = (id<YASNativeImageComponent>)[nativeAd component: @"mainImage"];

Expand All @@ -780,6 +781,9 @@ - (void)nativeAdDidLoad:(YASNativeAd *)nativeAd
mediaView = [[UIImageView alloc] init];
mediaView.contentMode = UIViewContentModeScaleAspectFit;
[mainImageComponent prepareView: (UIImageView *) mediaView];

UIImage *image = ((UIImageView *) mediaView).image;
mainImage = [[MANativeAdImage alloc] initWithImage: image];
}

NSString *templateName = [self.serverParameters al_stringForKey: @"template" defaultValue: @""];
Expand All @@ -803,6 +807,10 @@ - (void)nativeAdDidLoad:(YASNativeAd *)nativeAd
builder.advertiser = advertiser;
builder.callToAction = callToAction;
builder.icon = iconImage;
if ( ALSdk.versionCode >= 11040299 )
{
[builder performSelector: @selector(setMainImage:) withObject: mainImage];
}
builder.mediaView = mediaView;

#pragma clang diagnostic push
Expand Down

0 comments on commit 49533ca

Please sign in to comment.