Admob close button is upper the safe area on iPhone 12

Viewed 560

Using Google-Mobile-Ads-SDK 7.68, users can't close GADInterstitial, the close button is upper the safe area (user interaction is not permitted here) :

enter image description here

It's happening at least on iPhone 12 pro and iPhone 12 pro max.

What I tried :

GADInterstitial *interstitial = [[GADInterstitial alloc] initWithAdUnitID:@"xxx"];
GADRequest *request = [GADRequest request];
[interstitial loadRequest:request];
1 Answers

Hiding status bar let the user click on the close button. Ugly deprecated method, but it's working for now.

/// Tells the delegate that an interstitial will be presented.
- (void)interstitialWillPresentScreen:(GADInterstitial *)ad {
    [[UIApplication sharedApplication] setStatusBarHidden:YES];
}

/// Tells the delegate an ad request failed.
- (void)interstitial:(GADInterstitial *)ad didFailToReceiveAdWithError:(GADRequestError *)error {
    [[UIApplication sharedApplication] setStatusBarHidden:NO];
}

/// Tells the delegate the interstitial is to be animated off the screen.
- (void)interstitialWillDismissScreen:(GADInterstitial *)ad {
    [[UIApplication sharedApplication] setStatusBarHidden:NO];
}

/// Tells the delegate that a user click will open another app
/// (such as the App Store), backgrounding the current app.
- (void)interstitialWillLeaveApplication:(GADInterstitial *)ad {
    [[UIApplication sharedApplication] setStatusBarHidden:NO];
}

enter image description here

Related