React-native-admob: No banner ad displayed on 32-bit iOS devices (iOS simulator and Android works)

Created on 6 Apr 2017  路  9Comments  路  Source: sbugert/react-native-admob

Update: Appears this is only a problem on 32-bit iOS devices (5, 5c).
Update2: Confirmed this allowed ads to load and cycle on iPhone 5 and 5c installs via app store (release) with configuration as listed below.

This is more of a note for others that might encounter this as I found a work-around:

RN: 0.39
iOS GoogleMobileAds.framework: 3.15.0
RN-admob: 1.2.1
iOS device OS: 10.multiple

I have this code:

      var adUnitID = 'ca-app-pub-***'
      if (__DEV__) adUnitID = 'ca-app-pub-3940256099942544/6300978111' /*THIS IS GOOGLE TEST ACCOUNT ADunit ID - FOR TESTS ONLY */

      return(
        <View style={styles.adBannerView} >
          <AdMobBanner
            bannerSize="smartBannerPortrait"
            adUnitID={adUnitID}
            testDeviceID="EMULATOR"
            didFailToReceiveAdWithError={this.bannerError}
          />
        </View>
      );

Android devices: Displays ads as expected
Android Simulator: Displays ads as expected
iOS Simulator: Displays ads as expected

iOS Devices: no ads displayed for _DEV_ or release, no error messages in log, didFailTo... not called. (Even with device's ID set for testDeviceID no ads no errors)

I was able to get ads displaying on iOS devices by adding:

adViewDidReceiveAd ={null}

I don't know why it works, but when I started adding callbacks to try to trace the problem I found it worked, and it would work with just this one, even when it was explicitly set to null.

Most helpful comment

I ran into the same issue but the aforementioned workaround did not work for me (adding adViewDidReceiveAd={null}). However, adding the following 2 null callbacks did work for me:

adViewDidDismissScreen={null}
adViewWillLeaveApplication={null}

All 9 comments

Same here!
To me adViewDidReceiveAd ={null} doesn't work.

Same here!

Same Issue, any movement on this?

@Proberts Ads isn't shown on my iPhone 5 simulator with iOS 10, are you able to fix it or have a new work-around? Thanks.

@Proberts @sbugert Surprisingly adViewDidReceiveAd={null} works for me too. It's likely a bug.

I was able to get ads displaying on iOS devices by adding:

adViewDidReceiveAd ={null}

I ran into the same issue but the aforementioned workaround did not work for me (adding adViewDidReceiveAd={null}). However, adding the following 2 null callbacks did work for me:

adViewDidDismissScreen={null}
adViewWillLeaveApplication={null}

It actually doesn't make sense that setting these properties to null make a difference. Could be an issue with the Google-Mobile-Ads-SDK? Because I can't think of any reason how the library would behave differently on 32-bit devices than 64-bit.

adViewDidReceiveAd ={null}
adViewDidDismissScreen={null}
adViewWillLeaveApplication={null}

Works for me!

Was this page helpful?
0 / 5 - 0 ratings