Stop iAd call back methods - ios

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.

Related

How to stop showing AdMob banner ad correctly?

I am building an app which will display AdMob banner ad, and when user successfully purchased an IAP item, the banner ad will never show up again, and the screen area originally occupied by the banner ad will be used by the app real functions.
The question is how to dismiss the bannerView or does not init it on the next launch up? And how to insure AdMob Sdk will never refresh the ad content in the background?
I think we cannot just hide the bannerView with just a statement:
bannerView.isHidden = true
And, as we know, AdMob SDK use IDFA. But Apple will deny an app which use IDFA but not showing Ads.
Google has guides on how to show up ads, but I cannot find information about how to stop showing ads from Google.
How to get this problem out?
The question is how to dismiss the bannerView or does not init it on
the next launch up? And how to insure AdMob Sdk will never refresh the
ad content in the background?
There are multiple ways to do this. One way I can think of is to add multiple targets in your Xcode project.
And the easier way, the more practical way - at least for me, is to prevent the requests for ads through GADRequest().
You can even do this even in AppDelegate, when setting Ids to your SDK.
That's it. You may also set nil to the delegate property of your bannerView.
And like what you've mentioned, just hide the bannerView's container, and everything should be perfect. I've worked on lots of applications with Admob, and I believe there should be no problem doing this approach.

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.

iAd Interstitial: Determining if ad was shown?

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...

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.

How to load ADInterstitialAd only when required in iOS?

I would like to show interstitial ads in my iOS application for some specified time interval.
Also, I do not want to disturb the User Interaction. I would like to show this Interstitial Ad when user tries to navigate from the scree/some other action.
But, I don't see any method/call in iOS that would load the InterstitialAd when required.
Also, [interstitialAdObj presentFromViewController] is also deprecated in iOS 7.
My question is, what is the another way to show/present the interstitial ads only when required?
This one works for me in iOS 7. Found in the ADInterstitialAdDelegate
-(BOOL)presentInView:(UIView *)containerView;
Also
-(BOOL)requestInterstitialAdPresentation NS_AVAILABLE_IOS(7_0);
I hope that helps you.

Resources