mobfox / MobFox-iOS-SDK

Apache License 2.0
15 stars 12 forks source link

If "refresh" is used, banner ads will show themselves when explicitly "hidden" #52

Open andre-arsenault opened 6 years ago

andre-arsenault commented 6 years ago

Using the provided interface, the "hidden" flag on MobFoxAd is ignored when set in combination with the "refresh" data member.

When the refresh time expires, a new ad is loaded and displayed even if hidden is set to YES. This is unexpected. Instead, no ads should be requested or displayed while the it is marked as hidden, even when auto-refreshing. When the ad is no longer hidden, the refresh timer should resume and request/display new ads as appropriate.

Example:

MobFoxAd* mobfoxAd = [[MobFoxAd alloc] init:@"your-publication-hash" withFrame:adRect];
mobfoxAd.refresh = 30;
// set delegate, add to view hierarchy
[mobfoxAd loadAd];
...
// sometime later:
mobfoxAd.hidden = YES;
// the ad will display on the 30-second interval even though it's supposed to be hidden