-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding Oath (Verizon Ads SDK) Adapter v1.0.3.0 #103
Adding Oath (Verizon Ads SDK) Adapter v1.0.3.0 #103
Conversation
GADAdSizeEqualToSize(kGADAdSizeSmartBannerLandscape, adSize) ) { | ||
int offsetX = (int)(windowSize.width / 2); | ||
|
||
if ( windowSize.height < MM_SMARTBANNER_MED_CUTOFF ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these be checking for width instead of height?
When making a SmartBanner request for a phone, it's trying to return a size applicable for a tablet (MM_SMARTBANNER_TABLET) instead of for a phone, causing the returning banner to be too large for the ad view.
|
||
if ( windowSize.height < MM_SMARTBANNER_MED_CUTOFF ) { | ||
// MYDAS will attempt to return a 320x50, even when hsht < 320 / hswd < 50 | ||
return CGRectMake(0,0,-1,-1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this return MM_SMARTBANNER_PHONE size rather than -1, since the ad request will fail if this method returns a width less than 0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @joshuajplagonera sorry for the long delay in getting back to you.
Should these be checking for width instead of height?
When making a SmartBanner request for a phone, it's trying to return a size applicable for a tablet (MM_SMARTBANNER_TABLET) instead of for a phone, causing the returning banner to be too large for the ad view.
The height check is correct (since ad width isn't always a clear signal for evaluating the ad size for the frame), but you are right that for phones with larger screens the adapter is trying to request the tablet size. We're going to refactor this method and submit an updated PR.
Should this return MM_SMARTBANNER_PHONE size rather than -1, since the ad request will fail if this method returns a width less than 0?
No, -1 means that the banner shouldn't be requested. (see line 88 in GADMVASAdapterBaseClass.m)
…0.3.0 PiperOrigin-RevId: 256583841
This pull request replaces #102. Please note that the adapter must be used with Verizon Ads SDK v1.0.3.