I show an interstitial ad before I do a scene transition. I do the transition in the adViewDidDismissScreen method. But the game crashes, I think because of autocaching. If I move the scene transition to adViewDidReceiveAd, there is no crash.
Can I disable auto caching on Admob after showing an ad? I don’t want to be waiting for a new ad to cache before doing a scene transition.
Edit: I can reproduce this pretty reliably, even with test ads enabled.
Just to be definitely sure, have you tried placing
auto mainMenu = MainMenu::createScene();
Director::getInstance()->replaceScene(mainMenu);
in one of these blocks to ensure it is called on the main thread? As Cocos2d-x (I believe anyway!) needs to be run only on the main thread and the callback for when the ad is dismissed may be called from a different thread.
How are you presenting the advert? Perhaps something is amiss there. If Admob works how I’d expect it to, you initialise Admob (so it can cache an advert), call something to present an advert, and when the advert is exited it should call the dismissedAdvert (or whatever it is called) function. It shouldn’t be waiting on caching - that should occur in the background.
Have you got the most up to date version of Admob? Try running sdkbox update in your project directory.