I am using "react-native-google-mobile-ads": "^6.3.0",
It was working when I uses expo-ads-admob
https://docs.expo.dev/versions/latest/sdk/admob/
But it's deprecated a month ago, and they recommended using react-native-google-mobile-ads
.
So I migrated from expo-ads-admob
to react-native-google-mobile-ads
It works with test unitID (in emulator and testflight, devices)
It doesn't show with product unitID, and shows error like this
Code is like below
App.tsx
export default function App() {
useEffect(() => {
request(PERMISSIONS.IOS.APP_TRACKING_TRANSPARENCY)
mobileAds()
.initialize()
.then(adapterStatuses => {
console.info('=== adapter ===', JSON.stringify(adapterStatuses, null, 4))
// Initialization complete!
})
.catch(err => {
console.info('=== err ===', JSON.stringify(err, null, 4))
});
}, [])
...
Admob.tsx
const interestialAd = InterstitialAd.createForAdRequest(unitId); // demo unitId works, but real unitId not working
export const CustomAdMob = (props) => {
const [loaded, setLoaded] = useState(false);
useEffect(() => {
const unsubscribe = interestialAd.addAdEventListener(AdEventType.CLOSED, () => {
setLoaded(false)
interestialAd.load();
});
return () => {
unsubscribe()
};
}, []);
useEffect(() => {
if (loaded) {
interestialAd.show()
}
}, [loaded])
...
Admob account is created 20 days ago and unit also created 20 days ago.
Admob account payment are verified and app status is ready
And there is no privacy issue.
IOS app is fully published in app store.
I am not sure what's wrong