iAd Interstitial: Determining if ad was shown? - ios

I'm showing interstitials by using destinationVC.interstitialPresentationPolicy = ADInterstitialPresentationPolicy.Automatic before I actually show the destintion view controller.
How am I supposed to detect if an interstitial loaded? I need to know so I can know if I should reset a timer that let's me show interstitials every few minutes.
It's weird - even with 100% fill rate enabled in my developer settings, my interstitial doesn't always show...
I tried implementing ADInterstitialDelegate but it seems interstitialDidLoad doesn't actually execute?

For the fillrate, are you talking about test ads or live ads? iAd has a very low live ads fill rate and is even not supported at all in many countries...
For the delegate, did you assign the delegate e.g.
self.interstitial.delegate = self;
Assign it and do an NSLog for example in the delegate methods like in interstitialDidLoad to test if it s called...
P.S. A timer to fire ads isn t really a good idea... Ads should be fired after an action by a user, at a specific time regarding the app lifecycle / usage and should not interrupt, what would obviously happen if you use a timer...

Related

Can you preload admob DFPBannerView on iOS

Can you preload admob DFPRequest on iOS? I know you can for interstitials, but was wondering about DFPBannerView
Create one GADBannerView and one request inapplicationDidFinishLaunching, listen to the GADBannerView's delegate method to know when it's loaded, and then present it on any view you desire. applicationDidFinishLaunching would be the earliest you could make your request. Check this example using an ADBannerView and Swift. The implementation would be the same.
No, you can't do it for banners. Once you call LoadAd() for a banner ad unit, your banner ad starts loading and refreshes after a set interval (what you've set on the dashboard, or the default), if any.
There is no way to preload admob banner ads like interstitial.

Receiving Delegate Methods for iAd Banners iOS 7

In iOS 7, ADBannerView no longer needs to be created manually. Instead, they can be requested with a simple self.canDisplayBannerAds = YES;
Now, I cannot set my View Controller as the banner delegate because there is no banner for me to access (to my knowledge).
I need to know when the banner is tapped and when that action is dismissed so I can properly pause/start my Sprite Kit game.
How am I supposed to have these delegate methods called so I can properly respond to the user's actions?
AFAIK, there is nothing in the UIView Controller iAD Additions that explains how to set the delegate for the banners.
Do I need to create the banners manually, or is there a way to achieve this while still using the newer API's?
Unfortunately, if you want to use the delegate methods, you will need to set up your iAd Banner manually. Even if you make your vc the delegate, by just using self.canDisplayBannerAds = YES, will not call the methods you need. In my sprite kit game, I made all the banners manually so I could take care of pausing the game and going to the background. Making them give you the control you are looking for. Good luck.

Calling interstitial iAd works only one time

I have spritekit game, Ad is preloaded on each start of game with [UIViewController prepareInterstitialAds]; And after gameover it should display ad with [self.view.window.rootViewController requestInterstitialAdPresentation]; and it's works okay, but only first time. The ad's shows only one time. After failing another game, ad do not show though preload. Any suggestions?
Do you have it set up to where it runs
[self.view.window.rootViewController requestInterstitialAdPresentation];
each time the game ends?
See the answer by gj15987 here...
requestInterstitialAdPresentation Works only one Time
He says there's a two minute block out period. I tried it and found it took 3min 20sec to allow another ad for me. I have fill rate set to 100% in the Developer section of Settings.
From the doc :
"The second major difference between a banner view and an full-screen advertisement is that the full-screen advertisement does not cycle through new content. An full-screen ad object loads a single advertisement; once that content expires, your app must release the ad object. Each time your app needs to show a new advertisement, it must explicitly create a new ad object."
straight from the horse's mouth :
iAd Programming Guide : Full-Screen Advertisements

adding Interstitial into chartboost

so after a week of attempting to load chart boost to my non-arc iOS app in Xcode, I'm gonna start asking some really silly questions.
my code in my appdelegate is:
(void)applicationDidBecomeActive:(UIApplication *)application {
[[CCDirector sharedDirector] resume];
Chartboost *cb = [Chartboost sharedChartboost];
cb.appId = #"530dd707f8975c182ae2c691";
cb.appSignature = #"0d8726e69c911a182b0cefac4eca36f692355725";
// Required for use of delegate methods. See "Advanced Topics" section below.
cb.delegate = self;
// Begin a user session. Must not be dependent on user actions or any prior network requests.
// Must be called every time your app becomes active.
[cb startSession];
[cb showMoreApps];
[cb cacheInterstitial:#"Play Again"];
[cb showInterstitial:#"Play Again"];
// Show an interstitial
[cb cacheInterstitial:#"Highscores"];
[cb showInterstitial:#"Highscores"];
when i start the app, yea i get the test ad appear so thats all good, but i cannot get it to show apps throughout the game or get these interstitials working at all.
so my first question: will the random ad's appear throughout the app(but only when the game is uploaded to the app store and not through test mode)
and secondly, can someone please explain with this showInterstitial locations. I've read many many documentations, even looked through the examples on chart boost, which they only link to buttons rather than to, for example, when i die in the game and then i want an ad to appear.
so can someone explain on here how to implement these interstitial appearance, as my "play again" and "highscores" seem to do nothing(and yes I've added a campaign logic but still, no ad is showing when the player dies and the screen goes to the high score page
few things:
Ads will appear throughout the app, not at random but where you place them.
The locations are simply names for your own reference. You still need to place the showInterstitial code in the right place for it to show when you want in. For instance, when your player dies and you should call [cb showInterstitial:#"play again"]; and when the player navigates to the high score page you call [cb showInterstitial:#"highscores"];.
The location names can be anything: location1, location2 or play again, highscores... it doesn't actually matter. But you should call [cb showInterstitial:#"play again"]; only on play again, and [cb showInterstitial:#"highscores"]; only when players view the high score screen. Once you set all that up in the app, you can turn interstitials on/off via the dashboard.
Finally, you should never call cacheInterstitial and showInterstitial immediately after each other. This can cause a race condition and produce unexpected results. Simply call cacheInterstitial when you bootup, and showInterstitial everywhere else in your app.
If you have any other questions, feel free to email support#chartboost.com
Full disclosure: I work at Chartboost

Stop iAd call back methods

I've set up iAd in my iOS app. When I saw the fill rate, it is very low. So I would like to insert an AdMob(an other ad provider) banner when iAd banner didFailToReceiveAdWithError.
The process goes well but I do not find the way to stop iAd to call request. So if iAd bannerViewDidLoadAd, my app display both banners.
Is there any way to stop iAd request ?
Set the iAd delegate to nil and also set the iAd banner to nil. Setting the delegate to nil, you will not receive callback anymore.
A cleaner way to handle it would be to use a mediator like Admob to serve both kinds of ads. When your first option fails to deliver it handles the fallback to your 2nd and 3rd, 4th, 5th options.

Resources