Please help me Google AdMob is not displayed

We are developing using expo.
And… Used the ‘react-native-google-mobile-ads’
It looks good in the simulator, but it is not visible in the actual device.
However, it only appears once in a while.
Both ios and android are the same.
Is it because there is no SKAdNetwork setting?
Or maybe I’m missing some other setting or it’s a code error, I don’t know.

Please

Below is the app.json / eas.json / application code

app.json

{
   "expo": {
     ~~~
   },
   "react-native-google-mobile-ads": {
       "android_app_id": "ca-app-pub-3564826187055814~xxxxxxxx",   //example 
       "ios_app_id": "ca-app-pub-3564826187055814~xxxxxxxx"  //example
   }
}

eas.json

{
  "cli": {
    "version": ">= 3.14.0"
  },
  "build": {
    "development": {
      "developmentClient": true,
      "distribution": "internal",
      "ios": {
        "simulator": true
      }
    },
    "preview": {
      "distribution": "internal"
    },
    "production": {
      "autoIncrement": true
    }
  },
  "submit": {
    "production": {}
  }
}

Application Code

import React from 'react';
import {StyleSheet, SafeAreaView, Platform} from 'react-native';
import {BannerAd, BannerAdSize, TestIds} from 'react-native-google-mobile-ads';

const adUnitId = __DEV__
  ? TestIds.BANNER
  : Platform.OS === 'ios'
    ? 'ca-app-pub-3564826187055814/~~~~~~'
    : 'ca-app-pub-3564826187055814/~~~~~~';

export function Ad() {
  return (
    <SafeAreaView style={styles.root}>
      <BannerAd
        unitId={adUnitId}
        size={BannerAdSize.ANCHORED_ADAPTIVE_BANNER}
        requestOptions={{
          requestNonPersonalizedAdsOnly: true,
        }}
      />
    </SafeAreaView>
  );
}

const styles = StyleSheet.create({
  root: {
    display: 'flex',
    width: '100%',
    alignItems: 'center',
    justifyContent: 'center',
  },
});

he issue with ‘react-native-google-mobile-ads’ not consistently displaying ads on actual devices could be due to:

  1. Ad Unit Configuration: Ensure your ad unit IDs and AdMob account settings are correct.
  2. Test Ads: Use test ad unit IDs during development and switch to real ones when publishing.
  3. Error Handling: Implement proper error handling to identify issues.
  4. Permissions: Verify your app has internet and ad-related permissions.
  5. Platform-Specific: Follow platform-specific guidelines for iOS and Android.
  6. Library and SDK: Ensure you’re using the latest library and SDK versions.
1 Like

@james-carol
Thank you for your reply