You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
There are some Vast creatives that when they finish playing, a black screen is shown and they cannot be closed (because the close button does not appear).
The problem is that in this method when creating the companion, it could become nil and later, the creative model asks for hasCompanionAd, but it does not have more creatives to show.
Solution
Change to true hasCompanionAd only if a not nil companion was obtained.
if (companionItems.count > 0) {
// Now try to create the companion items creatives.
// Create a model of the best fitting companion ad.
PBMCreativeModel *creativeModelCompanion = [self createCompanionCreativeModelWithAd:vastAd
companionAds:companionItems
creative:creative];
if (creativeModelCompanion) {
// There is at least 1 companion. Set the flag so that when the initial video creative has completed
// display, the appropriate view controllers will prevent the "close" button and the learn more after the video has
// finished, it will instead display the endcard.
creativeModel.hasCompanionAd = YES;
[creatives addObject:creativeModelCompanion];
}
}
The text was updated successfully, but these errors were encountered:
Describe the bug
There are some Vast creatives that when they finish playing, a black screen is shown and they cannot be closed (because the close button does not appear).
The problem is that in this method when creating the companion, it could become nil and later, the creative model asks for
hasCompanionAd
, but it does not have more creatives to show.prebid-mobile-ios/PrebidMobile/PrebidMobileRendering/AdTypes/AdView/PBMCreativeModelCollectionMakerVAST.m
Lines 108 to 122 in 41dc565
To Reproduce
You can use any VAST creative that does not have an end card (e.g. https://prebid-mobile-ad-assets.s3.amazonaws.com/scripts/vasts/vast.xml) and add an empty ad companion creative to it.
This is not the only way, any VAST configuration that causes it to return nil in this method would also pass
prebid-mobile-ios/PrebidMobile/PrebidMobileRendering/AdTypes/AdView/PBMCreativeModelCollectionMakerVAST.m
Lines 173 to 244 in 41dc565
Solution
Change to true
hasCompanionAd
only if a not nil companion was obtained.The text was updated successfully, but these errors were encountered: