Admob banner malfunction on iOS. Stacking on top of each other

Calling admob.load( “banner”, {…} ) crashes the banner already on screen, if there is one.
It becomes unhidable and stuck forever. The next banner will be on top of it and it may cover content when switching scenes.

This is problematic when the banner tries to refresh and for some reason fails the load. In which case I have to manually try to reload it, with the not refreshed banner still there.
If I don’t manually reload it will wait a full minute or more to try again on itself.
Though the unrefreshed banner stays in this period, admob.show(“banner”) shows nothing if called, so if the user switches to a scene without a banner then back it won’t see banners on the return.
Banners fail to load for lack of inventory all the time so these bannerless periods can last several minutes if I don’t try reloading more frequently.

@vlads? This might be an easy fix, I don’t know

This should be fixed now, please rebuild

Great, its not happening anymore. On the other hand I noticed that now when calling admob.load the banner doesn’t crash anymore but instead just hides.
Is this on purpose? Ideally it would stay visible

When calling load again there are two practically options for what to when an ad is already loaded, do nothing and return a warning or destroy and reload the banner. I felt that the ladder was more appropriate and useful. You could always use the isLoaded to check before calling .load if you are interested in former.

Thanks for the info. In the situation you’re talking indeed you made the correct solution.
But there’s another situation where the banner is not loaded (isLoaded returning false) while there’s an unrefreshed banner on screen. In which case if you call load the unrefreshed banner disappears(previously it crashed).

I see, Admob recommends using auto refresh anyways or you can ajust refresh rate on admob portal.
You could always use quickly .load and .show an ad if you are having issues

@lmgualandi I just submitted update to make the .load function not destroy the ad anymore

Oh, great, thanks. It worked. Didn’t know you were the one maintaining the plugin, btw