googleads / googleads-mobile-flutter

A Flutter plugin for the Google Mobile Ads SDK
Apache License 2.0
340 stars 284 forks source link

Close button is impossible to click on some interstitial ads on iOS (Notch) #191

Closed andreacimino closed 1 year ago

andreacimino commented 3 years ago

Plugin Version

google_mobile_ads: ^0.12.1+1

Steps to Reproduce

Difficult to reproduce, since interstitial are not in control

I added a message on the admob forum too. Here is the link

https://groups.google.com/g/google-admob-ads-sdk/c/wvzE3I5LVw4/m/c4GPcOv2AQAJ

shunminghsu commented 3 years ago

I also get the same ad and same issue, but with different plugin. In my case, the X button is clickable by hiding the status bar when ad is opened.

if (event == AdmobAdEvent.closed) {
  SystemChrome.setEnabledSystemUIOverlays(SystemUiOverlay.values);
} else if (event == AdmobAdEvent.opened) {
  SystemChrome.setEnabledSystemUIOverlays([]);
}
andreacimino commented 3 years ago

Thank for the info!

maheshj01 commented 3 years ago

Hi @andreacimino @shunminghsu, Thanks for reporting the issue, Could you please share the output of flutter doctor -v and also see if the issue is reproducible using the latest plugin google_mobile_ads: ^0.13.3. And could you guys also share on which device is this issue on?

I verified on the iPhone 12 pro max (Simulator) and could not reproduce the issue below are the screenshots attached.

Interstitial ads output ad1 | ad2 :-------------------------:|:-------------------------: ![](https://user-images.githubusercontent.com/31410839/128824997-1aaf95e9-24f4-4505-82b7-d1bf446430d2.png) | ![](https://user-images.githubusercontent.com/31410839/128824945-cc854609-4a7d-4e11-84a9-54b0bebe2330.png)

Thanks.

tal412 commented 3 years ago

Having the same issue.

maheshj01 commented 3 years ago

@tal412 may I know what device is this issue on?

tal412 commented 3 years ago

@tal412 may I know what device is this issue on?

iPhone 12.

maheshj01 commented 3 years ago

@tal412 thanks for the info, I verified this issue on the iphone12 simulator but could not reproduce it and found same results as above. This looks like it is device specific issue.

flutter doctor -v ``` [✓] Flutter (Channel stable, 2.2.3, on macOS 11.4 20F71 darwin-arm, locale en-GB) • Flutter version 2.2.3 at /Users/mahesh/Documents/flutter • Framework revision f4abaa0735 (6 weeks ago), 2021-07-01 12:46:11 -0700 • Engine revision 241c87ad80 • Dart version 2.13.4 [✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0) • Android SDK at /Users/mahesh/Library/Android/sdk • Platform android-31, build-tools 31.0.0 • ANDROID_HOME = /Users/mahesh/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 12.5.1, Build version 12E507 • CocoaPods version 1.10.1 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 4.2) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264) [✓] VS Code (version 1.58.0) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.25.0 [✓] Connected device (3 available) • iPhone 12 (mobile) • 19EA5268-C931-4C3A-ACC6-71D3E849C450 • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-5 (simulator) • macOS (desktop) • macos • darwin-arm64 • macOS 11.4 20F71 darwin-arm • Chrome (web) • chrome • web-javascript • Google Chrome 92.0.4515.131 • No issues found! ```
tal412 commented 3 years ago

@tal412 may I know what device is this issue on?

iPhone 12.

I guess it has something to to with production ads, not test ads... I also think it's a specific kind of ad which won't show up all the time.

There is no reproducible code - because there is nothing special about it. It's just the normal code which takes an interstitial ad's id and shows it.

Here is another example:

image

Please fix this asap. This is a very bad user experience.

pynner commented 3 years ago

Users have reported this issue on iPhone 12s

We now call SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersive); before showing the ad then on dismiss call SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);

RafiqCR7 commented 2 years ago

I'm still having this issue. Problem with using the SystemUIMode functions is that it refreshes the screen and my app loses it's current state.

atrope commented 2 years ago

We are having some issues in iOS with 2.0.0.

It depends on the creative so we don't have a way to reproduce:

image

senneclaeskens commented 2 years ago

Can confirm this. Any workaround and/or fix to apply? Multiple users are reporting this issue.

maheshj01 commented 2 years ago

Updated the priority, since this seems to affect a significant group of users.

maheshj01 commented 2 years ago

Anyone who is affected by this issue please leave an upvote on the original issue report

maheshj01 commented 2 years ago

cc: @jjliu15

atrope commented 2 years ago

Users have reported this issue on iPhone 12s

We now call SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersive); before showing the ad then on dismiss call SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);

for now you can use this workaround. It does works.

uugurbas commented 2 years ago

I have the same issue with iphone 14 pro max, ios 16

timothyhoang-google commented 2 years ago

@huycozy, @maheshmnj - is this issue related to #648?

huycozy commented 2 years ago

@timothyhoang-google It might be related to #648.

648 is duplicated with a closed issue #639 about Stricter enforcement of status bar controls but the OP has closed it by using a workaround.

I also see some similar workarounds here at https://github.com/googleads/googleads-mobile-flutter/issues/191#issuecomment-832371320 and https://github.com/googleads/googleads-mobile-flutter/issues/191#issuecomment-922364313. These workarounds are the same by using SystemChrome manually when the ad is opened/closed.

timothyhoang-google commented 2 years ago

@jjliu15 - PTAL

emac62 commented 2 years ago
Screen Shot 2022-10-04 at 10 35 31 AM

Trying to add interstitial ads to a flutter app. The close button on the iPhone 14 Pro Max iOS 16.0 does not work, the ad will not close. The suggested work arounds do not work for me. Flutter 3.3.0 google_mobile_ads: ^2.0.1

timothyhoang-google commented 2 years ago

We are still investigating. It's likely this is a native GMA SDK issue that must be resolved in the next granular release of the iOS and Android GMA SDKs.

jjliu15 commented 2 years ago

I've been able to reproduce this issue on iOS 16 devices.

This looks like a Flutter specific issue. GMA is not able to hide the status bar, due to how flutter overrides its status bar style when UIViewControllerBasedStatusBarAppearance is false (see FlutterPlatformPlugin.mm). I tried setting modalPresentationCapturesStatusBarAppearance on the FlutterViewController as recommended by https://developers.google.com/admob/ios/migration#stricter_enforcement_of_status_bar_controls, but it does not work.

We will need to add a similar workaround as https://github.com/googleads/googleads-mobile-flutter/issues/191#issuecomment-922364313 that overrides the status bar style when the plugin displays a full screen ad.

In the meantime, a simpler workaround is to override UIViewControllerBasedStatusBarAppearance to true in your info.plist file:

<key>UIViewControllerBasedStatusBarAppearance</key>
<true/>
jiwooIncludeJeong commented 1 year ago

@jjliu15 this solution is has no effect on Flutter status bar? i want to use this solution to my React Native by setting ADX ads to SafeArea