Skip to content
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

Return MREC ad size for fluid banner size #71

Open
wants to merge 2 commits into
base: 7.2.x_pre_release
Choose a base branch
from

Conversation

crbinsf
Copy link

@crbinsf crbinsf commented Feb 21, 2024

With GAM support of fluid banner sizes (providing 0,0 as the banner size for the ad to be requested), this change will allow for the VungleSDK to request an MREC ad when the fluid size is included in the ad load request.

IOS-6609

With GAM support of fluid banner sizes (providing 0,0 as
the banner size for the ad to be requested), this change will
allow for the VungleSDK to request an MREC ad when the
fluid size is included in the ad load request.

IOS-6609
@crbinsf
Copy link
Author

crbinsf commented Feb 21, 2024

@stanley-vungle , @ashinagawa - changes here allow for testing of adapter change in this PR - https://github.com/Vungle/admob-adapter-testapp-ios/pull/53

Copy link

@YueVungle YueVungle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Copy link

@ashinagawa ashinagawa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good.
But, I couldn't verify it with test app as I added comment in https://github.com/Vungle/admob-adapter-testapp-ios/pull/53

This commit updates the adapter code to work with fluid banner
testing. It sets a fluid banner ad size when the initial banner request
is received and converts that to a MREC size before the SDK load
method is called. When the adapter is about to call the SDK present
method, the adapter updates the presenting bannerView size to
the expected MREC size to prevent errors in the SDK. Comments
added to help with testing.
#pragma mark - VungleBannerDelegate

- (void)bannerAdDidLoad:(nonnull VungleBanner *)banner {
CGSize updatedBannerSize = [self updateBannerViewSizeIfNeeded];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The indentations of the lines in this method is different. Thanks a lot. :)

(adSize.size.height == 0 && adSize.size.width == 0)) {
// if ((adSize.size.height >= GADAdSizeMediumRectangle.size.height &&
// adSize.size.width >= GADAdSizeMediumRectangle.size.width) ||
// (adSize.size.height == 0 && adSize.size.width == 0)) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because above lines are commented out, might we need to update below comment:

// VungleSDK will return MREC ad for 300 X 250 and greater OR
// for 0,0 provided sizes

to

// VungleSDK will return MREC ad for 300 X 250 and greater 

Thanks a lot. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants