iOS Admob open app ads issue with black background underneath


I implemented the open app ads (video here:

This looks like the first "Discouraged implementation example" in the official guide:

In the discouraged example below, the ad is placed after the loading screen and there is no content visible under the ad.

I simply call present in the loading screen like this:

[ad presentFromRootViewController:rootController]

Note that the viewDidDisappear of my loading screen was called just like presenting any normal view controllers, which of course hides the loading screen.

I am wondering how I can keep the original loading screen underneath the ad?

I wrote some dummy code to demonstrate it:

#import "ViewController.h"
@import GoogleMobileAds;

@implementation ViewController

- (void)viewDidLoad {
  [super viewDidLoad];
  // this is a dummy loading screen with bg color
  self.view.backgroundColor = UIColor.blueColor;
  [GADAppOpenAd loadWithAdUnitID:@"ca-app-pub-3940256099942544/3419835294" request:[GADRequest request] orientation:UIInterfaceOrientationPortrait completionHandler:^(GADAppOpenAd * _Nullable appOpenAd, NSError * _Nullable error) {

    // dummy 3 seconds loading duration
    [NSTimer scheduledTimerWithTimeInterval:3.0f repeats:NO block:^(NSTimer * _Nonnull timer) {
      // present the ad, notice the black color behind the open app ad
      // i.e. the loading screen is gone
      // this is just like the first "Discouraged implementation example" here:
      [appOpenAd presentFromRootViewController:self];


Source: Ios Questions

Categorised as admob, ios, uikit Tagged , ,


Leave a Reply

Your email address will not be published. Required fields are marked *

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us