react-native-admob icon indicating copy to clipboard operation
react-native-admob copied to clipboard

AdMobBanner is not displayed

Open yassineHub opened this issue 9 years ago • 19 comments

I have tried to add admob to my project . my project is running correctely without error but no banner is dispayed . my code is : <ScrollView> <AdMobBanner bannerSize="banner" adUnitID="ca-app-pub-3207834634154483/6974060636" testDeviceID="EMULATOR" didFailToReceiveAdWithError={this.bannerError} adViewDidReceiveAd ={null} adViewDidDismissScreen={null} adViewWillLeaveApplication={null}/> </ScrollView>

Can someone tell me what are probable reason why my banner is not dispayed .

Thanks

yassineHub avatar Nov 08 '17 22:11 yassineHub

Have you tried changing "bannerSize" to "adSize" and "didFailToRecieveAdWithError" to "onAdFailedToLoad"?

Mimble-Wimble avatar Nov 09 '17 18:11 Mimble-Wimble

@Mimble-Wimble the change worked for me. Thanks

theeomm avatar Nov 10 '17 20:11 theeomm

i was in 1.x branch version . i use now the version 2. my code now is : <AdMobBanner adSize="fullBanner" adUnitID="ca-app-pub-3207834634154483/6974060636" testDevices={"EMULATOR"} onAdFailedToLoad={error => console.error(error)} />

But i have this error capture

could you help me to fix this problem . what should set as a value in testDevices to let my code determine dynamicly the device ID .

yassineHub avatar Nov 10 '17 22:11 yassineHub

For v2 you should use testDevices={[AdMobBanner.simulatorId]} instead of the EMULATOR string.

koenpunt avatar Nov 12 '17 20:11 koenpunt

i tried with testDevices={[AdMobBanner.simulatorId]} , but it generate another error

capture

yassineHub avatar Nov 13 '17 21:11 yassineHub

@yassineHub any update on above issue? Are you able to use version 2 without any issues on android?

shubhangi-asgola avatar Nov 16 '17 09:11 shubhangi-asgola

I'm still stuck with the above issue . Any one have the same problem ?

yassineHub avatar Nov 16 '17 09:11 yassineHub

I am getting the same UIManager.RNGADBannerView issue. testing with iOS.

"react": "16.0.0-beta.5", "react-native": "https://github.com/expo/react-native/archive/sdk-22.0.2.tar.gz", "react-native-admob": "^2.0.0-beta.3",

Followed the directions that were given.

Any insight would be great.

svallen avatar Nov 17 '17 23:11 svallen

@yassineHub any update on above issue?

KamranKhankhail avatar Nov 19 '17 06:11 KamranKhankhail

@sbugert can you please help us fix this issue?

KamranKhankhail avatar Nov 19 '17 06:11 KamranKhankhail

@KamranKhankhail i have no update about issue :( i think i will return to the version 1.0

yassineHub avatar Nov 22 '17 23:11 yassineHub

@yassineHub could it be that you updated the NPM package, but did not rebuild the project? Because I can't reproduce this with the example application..

koenpunt avatar Nov 23 '17 08:11 koenpunt

Or are you by any change running an Expo project? Which I believe have no direct support for packages that need native modules.

koenpunt avatar Nov 23 '17 08:11 koenpunt

Yes, running expo. Bummer that this won't work properly with it. Was looking forward to getting my google ads loading on my app. Any suggestions or will there be compatibility coming down the line?

svallen avatar Nov 27 '17 02:11 svallen

Any suggestions or will there be compatibility coming down the line?

Well I think since the library depends on the Google-Mobile-Ads-SDK, this will never work out of the box.

The only probable option is to "eject", and then follow the installation steps in the README.

koenpunt avatar Nov 27 '17 16:11 koenpunt

But if you have any more questions regarding use with Expo, please open a new issue. (Unless @yassineHub is also using Expo?)

koenpunt avatar Nov 27 '17 16:11 koenpunt

Just realized that create-react-native-app uses Expo by default. So my guess is that’s the case here too. If not let me know and I’m happy to reopen.

koenpunt avatar Nov 28 '17 07:11 koenpunt

Please reopen this issue. It's not fixed yet.

I've confirmed the banner appear in Android emu + phy but the error shows when I react-native run-ios

2018-03-04 16 55 34

My lib version is 2.0.0-beta.4

akiradeveloper avatar Mar 04 '18 07:03 akiradeveloper

I also insert interstitial ad in my app and it also fails. They are ok in Android though.

2018-03-04 17 00 59

akiradeveloper avatar Mar 04 '18 08:03 akiradeveloper