first off: LOVE react-native-firebase, great work!!
My scenario is:
I'm making a puzzle game, during gameplay a user can use hints, they start with an initial amount , when they run out they can watch an ad or purchase more.
To make this flow as quick as possible, we're using a modal which pops up with these options.
My issue is:
While a react native <Modal /> is presented, I am unable to call advert.show() (where advert is from firebase.admob().rewarded(unitId)
If I dismiss the modal and then call advert.show() it works as expected.
I get this error from output:
 Warning: Attempt to present <GADOInterstitialViewController: 0x7fcacf058c00>  on <UIViewController: 0x7fcad1031100> which is already presenting <RCTModalHostViewController: 0x7fcaceec0380>
A stripped down version of my code is:
import firebase from 'react-native-firebase'
import { admob } from './config'
firebase.admob().initialize(admob.appId)
const AdRequest = firebase.admob.AdRequest
export const showAd = (sku) => {
    let unitId = admob.units[sku]
    if (!unitId) {
        unitId = admob.units['default']
        console.warn('no ad unit found for sku', sku, 'falling back to default')
    }
    const advert = firebase.admob().rewarded(unitId)
    const request = new AdRequest()
    request.addTestDevice('DEVICE_ID_EMULATOR')
    const req = request.build()
    advert.loadAd(req)
    console.log('ad built', unitId)
    advert.on('onAdLoaded', () => {
        advert.show()
    })
    advert.on('onRewarded', (event) => {
        console.log('ad reward collected', unitId)
    })
    advert.on('onAdOpened', () => {
        console.log('ad opened')
    })
    advert.on('onAdFailedToLoad', (err) => {
        console.error(err)
    })
}
Sorry if this belongs against the Admob iOS SDK instead - I'm not 100% sure!
ios/Podfile:# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'packs' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!
  # Pods for packs
  pod 'AppCenter/Crashes', '~> 1.5.0'
  pod 'AppCenter/Analytics', '~> 1.5.0'
  pod 'AppCenterReactNativeShared', '~> 1.4.0'
  pod 'NearbyMessages'
  pod "yoga", :path => "../node_modules/react-native/ReactCommon/yoga"
  pod 'React', :path => '../node_modules/react-native', :subspecs => [
    'Core',
    'DevSupport'
    # Add any other subspecs you want to use in your project
  ]
  platform :ios, '9.0'
  pod 'RNSound', :path => '../node_modules/react-native-sound'
  pod 'react-native-google-analytics-bridge', :path => '../node_modules/react-native-google-analytics-bridge'
  pod 'CodePush', :path => '../node_modules/react-native-code-push'
  pod 'lottie-ios', :path => '../node_modules/lottie-ios'
  pod 'lottie-react-native', :path => '../node_modules/lottie-react-native'
  pod 'react-native-splash-screen', :path => '../node_modules/react-native-splash-screen'
  pod 'react-native-keep-awake', :path => '../node_modules/react-native-keep-awake'
  pod 'Firebase/Core', '~> 5.9.0'
  pod 'react-native-fbsdk', :path => '../node_modules/react-native-fbsdk'
  pod 'FBSDKLoginKit'
  pod 'FBSDKShareKit'
  pod 'RNIap', :path => '../node_modules/react-native-iap'
  pod 'Firebase/AdMob', '~> 5.9.0'
end
post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name == "React"
      target.remove_from_project
    end
  end
end
AppDelegate.m:// N/A
android/build.gradle:// N/A
android/app/build.gradle:// N/A
android/settings.gradle:// N/A
MainApplication.java:// N/A
AndroidManifest.xml:<!-- N/A -->
iOS 12N/AN/AN/AADD_SOMETHING_HEREReact Native version:0.57.1React Native Firebase library version:5.0.0Firebase module(s) you're using that has the issue:
Are you using TypeScript?
N/AExpoKit?ExpoKitN/A
Think react-native-firebase is great? Please consider supporting the project with any of the below:
React Native Firebase and Invertase on TwitterHey - can you please confirm how you're showing a Modal? Is it using a JS lib or a native one?
Cheers
Sorry I left that out - I'm using react-native-modal which uses the native Modal
@joshbalfour Cheers... Could you show me the full code example of opening the model, showing the ad etc?
Hello 馃憢, this issue has been automatically marked as stale because it has not had activity for quite some time. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.
sorry haven't had a chance to produce a demo for this yet - will do soon!
Hello 馃憢, this issue has been automatically marked as stale because it has not had activity for quite some time. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.
Closing this issue after a prolonged period of inactivity. If this is still present in the latest release, please feel free to create a new issue with up-to-date information.
@joshbalfour where you able to fix it somehow? I'm seeing the same issue
Hi! How did you fix the issue?
AdMob doesn't work with opened <Modal visible={true}>, when function showAds transferred like a prop to this modal component.
function example:
showAds() {
    AdMobRewarded.showAd().catch(error => console.warn(error));
  }
AdMobRewarded.requestAd() is inside parent's componentDidMount
@ikonduktor I ended up closing the modal before opening the popup and opening it back after, quite crap
@obsidianart, Thanks, I'll try
@obsidianart Doesn't helped.
got in console
AdMobRewarded => adLoaded
AdMobRewarded => adOpened
but empty screen in app.
Added 1 second delay after closing the Modal, and everything works.
But I am not satisfied with the result. Any advice?
@ikonduktor how did you create the 1 second delay?
I am experiencing the same thing. If I have a 
Most helpful comment
@joshbalfour where you able to fix it somehow? I'm seeing the same issue