xamarin / GoogleApisForiOSComponents

MIT License
225 stars 161 forks source link

SafeArea gets ignored on Interstitial Ads #457

Open Sebastian1989101 opened 3 years ago

Sebastian1989101 commented 3 years ago

The close button is outside of the SafeArea for Interstitial Ads using version 7.66.0.

My code to open the interstitial ads:

var interstitial = new Interstitial(Metadata.GetAdMobSecret(Device.iOS, Metadata.AdMobType.Interstitial));
var request = Request.GetDefaultRequest();

interstitial.AdReceived += (sender, args) =>
    {
        if (interstitial.IsReady)
        {
            MainThread.BeginInvokeOnMainThread(() =>
                {
                    var window = UIApplication.SharedApplication.KeyWindow;
                    var controller = window.RootViewController;
                    while (controller?.PresentedViewController != null)
                        controller = controller.PresentedViewController;

                    interstitial.Present(controller);
                });
        }
    };

interstitial.LoadRequest(request);
Sebastian1989101 commented 3 years ago

Here are a few related url's (seems like it won't get fixed in the current SDK...):

https://github.com/FirebaseExtended/flutterfire/issues/3090 https://groups.google.com/g/google-admob-ads-sdk/c/iHL3nYLaDIY https://support.google.com/admob/thread/79302667?hl=en

emiliobongiorno commented 10 months ago

I'm having the same issue using version 8.13.0.3. Any update on this?