How to load ADInterstitialAd only when required in iOS? - 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.

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.

How to check if there are Chartboost Rewarded Ads available to display?

In my Swift iOS game I have a button that I show after the player loses, this button shows a rewarded ad from Chartboost.
The problem is that sometimes, i get an error on ad retrieval (error code 6) which is "No Ad Available". So i'm running out of ads for my region, i don't know why. Sometimes i'm able to watch 2-3 ads and that's all i can watch per day.
So when im running out of ads, the button still stays there of course, but does nothing. It might be confusing for the users to press the button and not see anything happening.
So i wanted to check if there are ads available, just hide the button.
The method i'm using to check if there is an ad available is:
Chartboost.hasRewardedVideo(CBLocationDefault)
But this somehow, is returning always false, no matter what CBLocation I use.
And I trigger the showAd() like this:
Chartboost.showRewardedVideo(CBLocationDefault)
Any suggestion?
Thanks.
What region are you currently located in? Chartboost might have some trouble filling ad requests if you happen to be located in a country like Pakistan or Thailand. It may be a simple case of not having enough advertisers in your area that meet your publishing criteria.
Also, are you trying to show an ad right away on your application's bootup or is it ingame somewhere?

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.

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.

Flurry Ads iOS Banners dismiss

Does anybody have experience with Flurry Ads? I am able to get their test ads to display. However, when I display a banner ad, there is no 'x' for the user to dismiss the ad itself. Does anyone know if this is intentional? Do I have to write my own code to give the user a specific banner dismissal action? Or am I doing something wrong?
I use Flurry Ads and no, there is no built-in close button on their banners. If you want the user to be able to close banners, you will need to create your own UI and implement the removeAdFromSpace method on your ad space.

Resources