UI doesn't respond when pod update Google-Mobile-Ads-SDK from 7.27.0 to 7.28.0

313 views
Skip to first unread message

hzb...@gmail.com

unread,
Feb 27, 2018, 12:11:16 AM2/27/18
to Google Mobile Ads SDK Developers
Hi, help needed!  


In some cases, my App may popup a view for user-interaction needs. For example, I will show a confirm view when a Download button pressed in non-wifi situation. This has 
always been done using following lines of code:

UIViewController *topViewController = [UIApplication sharedApplication].windows[0].rootViewController;
UIViewController *popViewController = ... // make a content view controller to be presented
[topViewController presentViewController:popViewController animated:YES completion:nil];

But when i update Google-Mobile-Ads-SDK to 7.28.0 from 7.27.0, bad thins happens. The presented content popup view doesn't appear when Download button pressed. Thanks for Xcode View Hierarchy Debug feature, I noticed an extra UIWindow object added pretty early, which had only one pixel, subview clipped, and user-interaction disabled. So the content popup view is invisible. 

How can I fix this problem? And what's the purpose of this extra window?

Many thanks in advance!

mobileadssdk-a...@google.com

unread,
Feb 27, 2018, 5:17:39 AM2/27/18
to hzb...@gmail.com, Google Mobile Ads SDK Developers
Hi,

This is an odd behavior because updating to a later version of the Google Mobile Ads SDK should have no impact with your UI Views. Also, upon testing with our sample apps (even with 7.28.0 version), I didn't see any extra UIWindow object added via the Xcode View Hierarchy Debug feature. Could you try with our sample apps and check if you can see the extra UIWindow?

For us to check on our end, could you provide to us a copy of a project where issue is reproducible as well as the affected Ad Unit Id/s? You may share this to us privately using Reply privately to author option.

Regards,
Ivan Bautista
Mobile Ads SDK Team

mobileadssdk-a...@google.com

unread,
Feb 28, 2018, 2:33:13 AM2/28/18
to hzb...@gmail.com, Google Mobile Ads SDK Developers
Hi,

Thank you for providing your test project privately which gave us a view on your implementation.

We were able to replicate the extra UIWindow you are pertaining to when we run your app on our end as well as when we upgrade to the latest SDK version (7.29.0 as of this writing). However, the extra UIWindow is not there if we downgrade to the 7.27.0 version similar to what you described. 

Also, we were able to replicate the click action issue you mentioned when the extra UIWindow is there and we are getiing the warning message "Warning: Attempt to present <PopupViewController: 0x7fb0bc410ab0> on <GADPlaceholderViewController: 0x7fb0bc621870> whose view is not in the window hierarchy!". Given this, we tried to edit your code implementation wherein when setting the rootViewController, instead of getting the first UIWindow directly from the windows array (which contains both visible and hidden windows), we tried to retrieve the app's keyWindow. After this little modification, the pop up view started showing even if the extra UIWindow is there.

What's odd to note is that there is nowhere in your code where you are implementing the Mobile Ads SDK. That said, we modified our sample app to only import the Mobile Ads SDK to the app via CocoaPods but remove all code implementation of the Mobile Ads SDK, and we were also able to replicate the extra UIWindow for both 7.28.0 and 7.29.0 version but didn't encounter it in 7.27.0 version.

We will raise this to the rest of team and get back to you for any official feedback. In the meantime, feel free to try out the little modification we mentioned above when setting your rootViewController similar to the code snippet below.

UIViewController *rootViewController = [UIApplication sharedApplication].keyWindow.rootViewController; 
[rootViewController presentViewController:popupViewController animated:YES completion:nil];

hzb...@gmail.com

unread,
Feb 28, 2018, 8:58:14 PM2/28/18
to Google Mobile Ads SDK Developers
Hi,

Anyway thank you for your revise opinion that presenting the popupViewController using the keyWindow's rootViewController instead the corresponding
one in first UIWindow of windows array, and this works well. However, I'm still confused about two question.

First, I didn't see the extra UIWindow when upgrading to the 7.29.0 version using the demo project I provided previously.


Second, could u please explain the purpose of the extra one-pixel-invisible UIWindow introduced in the 7.28.0 version?  The extra UIWindow is still here even if no implementing code and just linking against  the Mobile Ads SDK.

mobileadssdk-a...@google.com

unread,
Mar 1, 2018, 1:17:39 AM3/1/18
to hzb...@gmail.com, Google Mobile Ads SDK Developers
Hi,

Thank you for your patience and for reporting this to us. I'm glad that the modification suggested earlier worked on your end. 

Below are my responses to your questions.

First, I didn't see the extra UIWindow when upgrading to the 7.29.0 version using the demo project I provided previously. 
Apologies for the confusion. The extra UIWindow is indeed not reproducible in the 7.29.0 version. What I reproduced in the 7.29.0 version is the added GADPlaceholderView which is existing in the extra UIWindow in the 7.28.0 version. The added GADPlaceholderView is appearing in both later versions but not existing in the 7.27.0 version which is the one I raised to the rest of the team to investigate on. Please see attached screenshots of the View Hierarchy when I run the sample app (removing all code implementation) in all 3 versions. 

Second, could u please explain the purpose of the extra one-pixel-invisible UIWindow introduced in the 7.28.0 version? The extra UIWindow is still here even if no implementing code and just linking against the Mobile Ads SDK.
The team is actively investigating on this. I will get back to you on this thread once we get an official feedback from the team.  
Screenie_in_7.29.png
Screenie_in_7.28.png
Screenie_in_7.27.png

Ace Ventura

unread,
Apr 7, 2018, 12:01:25 PM4/7/18
to Google Mobile Ads SDK Developers
I'm also Having this issue with version 7.29.0.
It blocks my touches. Shows up as a Black Square in the View Hierarchy.. but not visible when running the app. 
I don't even have to instantiated banners. Or even import the Header Just importing the SDK into the project will cause the bug and bring the GADPlaceholder > WKWebView > .... WKCompositingView. 
Not Good. I will have to look for an older version of the sdk.
Please let us know when there is a fix.

Ace Ventura

unread,
Apr 7, 2018, 12:07:21 PM4/7/18
to Google Mobile Ads SDK Developers
Just verified.
I'm also Having this issue with version 7.30.0 (afma-sdk-i-v7.30.0)


On Tuesday, February 27, 2018 at 12:11:16 AM UTC-5, hzb...@gmail.com wrote:

mobileadssdk-a...@google.com

unread,
Apr 9, 2018, 5:47:08 AM4/9/18
to Ace Ventura, Google Mobile Ads SDK Developers
Hi Ace,

Thank you for your patience and for checking up on this. 

There are no recent updates regarding this issue but I will send a followup on this and get back to you for any official feedback. 

On the other hand, I tested the sample app with the latest SDK version (7.30.0 as of this writing) imported but removed all code implementation of the Mobile Ads SDK and I didn't see any extra UIWindow nor extra GADPlaceholderView added upon opening the Xcode View Hierarchy. Could you test with our sample app with the latest SDK version imported and see if you can reproduce the issue? 

cem.yesil...@gmail.com

unread,
Apr 13, 2018, 6:10:08 AM4/13/18
to Google Mobile Ads SDK Developers
Hi Ivan,

we're on 7.30.0 and are experiencing the same issue with the GADPlaceholderView. I haven't been able to reproduce it consistently.
Screenshot attached.

Do you have any updates on this?

Thanks!
Cem
gadplaceholderview.png

mobileadssdk-a...@google.com

unread,
Apr 16, 2018, 12:23:17 AM4/16/18
to cem.yesil...@gmail.com, Google Mobile Ads SDK Developers
Hi Cem,

I'm afraid there are no new updates on this yet. I will send another followup and get back to this thread once I get an official feedback from the team.

Niall Muldoon

unread,
Apr 16, 2018, 11:59:42 AM4/16/18
to Google Mobile Ads SDK Developers
Hi,

We were having a soft lock on our game due to this issue (the displayed callback was firing, but the advert never actually rendered). I resolved it by grabbing the keyWindow as previously posted and using that instead of windows[0].

We are now seeing an issue with the iOS GameCenter login notification (on game boot) being corrupted. It displays incorrectly up until the point where we have shown the first advert (similar symptoms to the soft lock). It appears to be rendering inside the very small (new) window rather than in the main game view window.

As with our previous soft lock issue, this corrects itself after the game has shown its first set of adverts. There must be some separate behaviour for this new window before/after the first advert has been requested to be shown...

Would be great to get an update for your SDK that reverts these changes as they seem to breaking quite a few things.

All the best,

Niall
GameCenter_CorruptRendering.PNG

mobileadssdk-a...@google.com

unread,
Apr 17, 2018, 2:02:13 AM4/17/18
to Niall Muldoon, Google Mobile Ads SDK Developers
Hi Niall,

The team is still working on the issue with the extra GADPlaceholderView. 

As for your other concern, it's odd that your Game Center notifications are rendering inside the extra window. 

For us to further investigate on this on our end, could you provide to us the following information privately using Reply privately to author option?
  • If possible, copy of your miniature sample app where issue is reproducible
  • Screenshot of your XCode View Hierarchy when the Game Center notification was rendered in the small window instead of your main window

Niall Muldoon

unread,
Apr 17, 2018, 8:53:08 AM4/17/18
to Google Mobile Ads SDK Developers
Hi Ivan,

Thank you for your quick reply.

We are not in a position to send out a build or minimal sample app, apologies for this.

I have found another thread that showcases the same issue we are having. I believe they have sent you a sample app for testing: https://groups.google.com/forum/#!category-topic/google-admob-ads-sdk/ios/M8LtzwnKCCk

I believe that the extra GADPlaceholderView is to blame both for the issue being discussed here and also in the thread I have just linked.

Hope that helps.

All the best,

Niall

mobileadssdk-a...@google.com

unread,
Apr 17, 2018, 11:20:51 PM4/17/18
to Niall Muldoon, Google Mobile Ads SDK Developers
Hi Niall,

Thank you for taking the extra effort to look through our forum threads. It's okay if you can't provide a miniature sample app.

Based from this forum thread you've pointed out, one of my colleagues, Ram, confirmed that the fix for the Game Center issue is already included in the latest version of the Google Mobile Ads SDK (7.30.0 as of this writing). Could you check it in our latest SDK version and see if the Game Center issue still persists on your end?

On the other hand, the root cause of the issue for the extra GADPlaceholderView and the Game Center issue might be related. I have yet to confirm this to the rest of the team and get back to this thread for more details.

mobileadssdk-a...@google.com

unread,
May 25, 2018, 5:57:09 AM5/25/18
to Niall Muldoon, Google Mobile Ads SDK Developers
Hi everyone,

I just want to check back if anyone is still encountering this issue.

EB

unread,
Aug 21, 2018, 11:13:57 AM8/21/18
to Google Mobile Ads SDK Developers

Yes this is still a problem!  I only just now found this issue after upgrading to 7.31 from 7.30 (though this bug also happens with 7.32).  I've got a custom UIWindow and as soon as I call [self makeKeyAndVisible]; then admob sticks a GADPlaceholderView into my view hierarchy.  This messes up my view handling.

NOTE that this only seems to happen on the first launch of the app, as the admob SDK may be trying to phone home on a new install, but this is exactly when I'm using my custom UIWindow to present a first-launch experience to the user, and admob's GADPlaceholderView is messing everything up.

Can you guys phone home NOT through a UI element?  7.30 works for now but 7.31 and 7.32 have this bad GADPlaceholderView behavior.

mobileadssdk-a...@google.com

unread,
Aug 22, 2018, 2:59:51 AM8/22/18
to EB, Google Mobile Ads SDK Developers
Hi,

Thank you for reaching out to us.

Could you provide to us privately (using Reply privately to author option) a copy of your project where we can easily reproduce the GADPlaceholderView messing up your view handling?

Regards,
Ivan Bautista
Mobile Ads SDK Team


--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/278c78f2-e06c-4ed4-95d1-83cfc406f4eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Silvio Savino

unread,
Sep 17, 2019, 10:52:12 AM9/17/19
to Google Mobile Ads SDK Developers
Hi,

was this bug being fixed in 7.29 as reported here? Because I'm currently using version 7.36 and I want to be sure that it has not regressed as @EB was pointing out for version 7.31/7.32.

Regards,
Silvio Savino

Mobile Ads SDK Forum Advisor Prod

unread,
Sep 17, 2019, 5:16:05 PM9/17/19
to silvio...@sega.co.uk, google-adm...@googlegroups.com
Hello there,

Thanks for reaching out to us. This issue was fixed and went live. Please note that you will still see GADPlaceholderView on first app launch. 

Let us know if you still see any issue. We will be happy to take a look.

Regards,
Deepika Uragayala
Mobile Ads SDK Team

 

ref:_00D1U1174p._5001UHH48f:ref
Reply all
Reply to author
Forward
0 new messages