cranberrygame / cordova-plugin-ad-admob

Other
10 stars 26 forks source link

IOS not calling onInterstitialAdHidden event. #3

Closed smatthews1999 closed 8 years ago

smatthews1999 commented 8 years ago

Hi. I believe I have found a problem with ios not calling the event 'onInterstitialAdHidden'.

Below is an excerpt of my code and the following is the XCode log. As you can see the log reports preloading of the ad initially, and then reports the presentation and dismissal of the ad, but the event calling the next preload is never called.

This works fine on Android but not IOS.

I am running XCode 6.4 under Yosemite.

Cordova version 5.1.1

Plugins ... at.gofg.sportscomputer.powermanagement 1.1.0 "PowerManagement" com.google.playservices 21.0.0 "Google Play Services for Android" cordova-plugin-ad-admob 1.0.96 "Cordova Admob plugin" cordova-plugin-ad-admobsdk 1.0.23 "Cordova Admob SDK" cordova-plugin-crosswalk-webview 1.2.0 "Crosswalk WebView Engine"

window.admob.setUp(bannerAdUnit, interstitialAdUnit, isOverlap, isTest);

window.admob.preloadInterstitialAd();

window.admob.onInterstitialAdHidden = function() {
    window.admob.preloadInterstitialAd();
};

====================

2015-08-15 09:16:49.794 BattleShips[332:55871] ca-app-pub-xxx
2015-08-15 09:16:49.794 BattleShips[332:55871] ca-app-pub-yyy
2015-08-15 09:16:49.795 BattleShips[332:55871] 1
2015-08-15 09:16:49.795 BattleShips[332:55871] 0
2015-08-15 09:16:49.820 BattleShips[332:55871] <Google> To get test ads on this device, call: request.testDevices = @[ @"d5a9244784342a62e10b685ee159a5be" ];
2015-08-15 09:16:49.825 BattleShips[332:55871] THREAD WARNING: ['Admob'] took '25.252197' ms. Plugin should use a background thread.
2015-08-15 09:16:51.464 BattleShips[332:55871] interstitialDidReceiveAd
2015-08-15 09:19:27.381 BattleShips[332:55871] interstitialWillPresentScreen
2015-08-15 09:19:35.698 BattleShips[332:55871] interstitialWillDismissScreen
2015-08-15 09:19:36.231 BattleShips[332:55871] interstitialDidDismissScreen
cranberrygame commented 8 years ago

Fixed this issue.

Thanks

smatthews1999 commented 8 years ago

Awesome thanks for the speedy fix.