capacitor-community / admob

Community plugin for using Google AdMob
MIT License
217 stars 68 forks source link

Interstitial ads are not being loaded on iOS #23

Closed fobaz closed 4 years ago

fobaz commented 4 years ago

Describe the bug Interstitial ads are not being loaded on iOS. AdMob.prepareInterstitial(options) just fails silently. The same codes works on Android.

I'm guessing the problem is in file admob/ios/Plugin/Plugin.swift, line 281 https://github.com/capacitor-community/admob/blob/7835645f8a40ca1f0f473a973096a010732d5c54/ios/Plugin/Plugin.swift#L281-L282

Shouldn't it be GADInterstitial and self.interstitial.load(GADRequest()) ?

fobaz commented 4 years ago

I guess this is related: https://github.com/capacitor-community/admob/issues/16

rdlabo commented 4 years ago

Now worked this, and interstitial.load(DFPRequest()) may current. Did you do showInterstitial() after onAdLoaded event?

スクリーンショット 2020-10-05 17 41 40

fobaz commented 4 years ago

The onAdLoaded event is never called. The code https://github.com/capacitor-community/admob/blob/243612d9c275fa0d598e09b46a57198fa2ec9cf7/ios/Plugin/Plugin.swift#L304 calls onInterstitialAdLoaded.

I tried to watch onAdLoaded and onInterstitialAdLoaded events, but none of them are actually called and interstitial is never loaded.

rdlabo commented 4 years ago

I understood. Sorry. This event not work event in v1.1.2. Please check pre-release version: https://github.com/capacitor-community/admob/releases/tag/v1.2.0-0

(Event added after v1.2.0: https://github.com/capacitor-community/admob/pull/15)

fobaz commented 4 years ago

Thank you, it is working now.

masterbd commented 4 years ago

I'm facing the same issue. With 1.2.0-0 is working, but i've found that the testing AdID for interstitial is using the one for banners.

I've created this small PR to fix this: https://github.com/capacitor-community/admob/pull/29

Waiting forward for the next release. Thank's @rdlabo!

psnfrench commented 3 years ago

This issue is happening for me in v 1.3.1 - the onInterstitialAdLoaded event is never fired