Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AdMob rewarded ad does not show on iOS #2292

Closed
1 of 6 tasks
lachtos opened this issue Jun 25, 2019 · 4 comments
Closed
1 of 6 tasks

AdMob rewarded ad does not show on iOS #2292

lachtos opened this issue Jun 25, 2019 · 4 comments

Comments

@lachtos
Copy link

lachtos commented Jun 25, 2019

Issue

On iOS only, calling .show() does not display the loaded rewarded ad.
Android works fine.
I have the same behaviour when using react-native-admob@2.0.0-beta.5 but on expo-ads-admob@5.0.1 it works great.

Using react-native-firebase@5.5.3, same behaviour on 5.4.3 also.

In Xcode I'm getting this warning:
2019-06-25 22:47:41.709477+0300 AppName[11144:66747] Warning: Attempt to present <GADFullScreenAdViewController: 0x7fb0a6fa7010> on <UIViewController: 0x7fb0a4f21630> which is already presenting <RCTModalHostViewController: 0x7fb0a817f650>


Project Files

iOS

Click To Expand

ios/Podfile:

  • I'm not using Pods
  • I'm using Pods and my Podfile looks like:
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'

target 'AppName' do
  # Comment the next line if you don't want to use dynamic frameworks
  #use_frameworks!

  # Pods for AppName
  pod 'React', :path => '../node_modules/react-native', :subspecs => [
    'Core',
    'CxxBridge',
    'DevSupport',
    'RCTText',
    'RCTNetwork',
    'RCTWebSocket',
    'RCTAnimation',
    'RCTImage',
  ]

  pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

  pod 'Firebase/Core', '~> 5.20.2'
  pod 'Firebase/AdMob', '~> 5.20.2'
  pod 'Firebase/Messaging', '~> 5.20.2'
  pod 'Firebase/RemoteConfig', '~> 5.20.2'
  pod 'Firebase/DynamicLinks', '~> 5.20.2'
  pod 'BVLinearGradient', :path => '../node_modules/react-native-linear-gradient'

end

AppDelegate.m:

// N/A


Android

Click To Expand

android/build.gradle:

// N/A

android/app/build.gradle:

// N/A

android/settings.gradle:

// N/A

MainApplication.java:

// N/A

AndroidManifest.xml:

<!-- N/A -->


Environment

Click To Expand

react-native info output:

React Native Environment Info:
    System:
      OS: macOS 10.14.5
      CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
      Memory: 83.77 MB / 8.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 12.4.0 - /usr/local/bin/node
      npm: 6.9.0 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
      Android SDK:
        API Levels: 28, 29
        Build Tools: 28.0.3, 29.0.0
        System Images: android-28 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom
    IDEs:
      Android Studio: 3.4 AI-183.6156.11.34.5522156
      Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
    npmPackages:
      react: ^16.8.3 => 16.8.3 
      react-native: ^0.59.9 => 0.59.9 
    npmGlobalPackages:
      react-native-cli: 2.0.1
  • Platform that you're experiencing the issue on:
    • [x ] iOS
    • Android
    • iOS but have not tested behavior on Android
    • Android but have not tested behavior on iOS
    • Both
  • Firebase module(s) you're using that has the issue:
    • Admob
  • Are you using TypeScript?
    • N


Think react-native-firebase is great? Please consider supporting all of the project maintainers and contributors by donating via our Open Collective where all contributors can submit expenses. [Learn More]

@mikehardy
Copy link
Collaborator

what version of react-native-firebase are you using? what version of react-native-admob and expo-ads-admob did you try?

@lachtos
Copy link
Author

lachtos commented Jun 25, 2019

Editted the issue, but I am using the latest releases. Was the same with firebase 5.4.3 though.

@mikehardy
Copy link
Collaborator

Thanks - that should be useful, knowing you’ve got one of the three that’s working (with a version) can hopefully let us check exactly what they are doing differently

@lachtos
Copy link
Author

lachtos commented Jul 2, 2019

facebook/react-native#10471
This seems like a react-native bug and is being worked on as far as I can see from the thread above. I was using niftylettuce/react-native-loading-spinner-overlay but will be moving to a custom solution because of this interaction. I guess expo has a custom solution for this so their ads show without problems..

Since it's not really a bug in rn-firebase, I'm closing the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants