Is it allowed to hide iAds even when they are available? - ios

I need to hide iAds depending on certain conditions, regardless their availability. So, I was wondering if my app would be rejected in the case where I hide the iAd, even when there's an iAd being displayed.

iAds will not work if their alpha is set to anything other than 1, so you could simply use this code to turn them off:
ADBannerView *banner;
[banner setAlpha:0];
This is how you would remove ads in apps, too, so your app will not get rejected for doing this - again, iAds do NOT display if the alpha is set to anything other than 1, so you can't hide an iAd and have it be displayed at the same time - pretty much, when you hide an iAd it is about the equivalent to the user not having any internet connection, and the iAd being hidden.

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.

AdMob, Google Mobile Ad, switching from iAd, bannerView

iOS 9.3, Xcode 7.3, ARC enabled.
I am migrating away from iAd, and I have some general questions regarding best design patterns and how to properly use the Google Mobile Ads framework for banner style ads.
How do you control presentation on ad load and load failure?
My typical approach is to start with the banner view hidden, detect when the ad is loaded, then either animate the banner view in from the top or bottom, or fade in from a stand-in image.
I noticed that GADBannerView class, does not have some of the more convenient properties of an iAd banner, such as isLoaded.
a) Right now I take advantage of the two methods - (void)adViewDidReceiveAd:(GADBannerView *)bannerView and - (void)adView:(GADBannerView *)bannerView didFailToReceiveAdWithError:(GADRequestError *)error, set an instance variable bool for the view controller when either method gets a message, then use that variable for any additional UI changes else where. Is this a good design practice?
b) "deleted", animation works.
c) When the ad fails to load, what happens to the banner view? I notice that its alpha property is still 1.0 and that it is not hidden. In a production environment when an AdMob ad fails to load, is the banner clear? Or does it have a generic stand-in image? In other words, am I going to have to slide in an image to balance the view without the banner view there?
I've read from the basic AdMob tutorial that it doesn't really matter where the banner is, it can be in multiple view controllers, the framework will manage how these multiple banners will be filled. Could someone confirm this behavior? Say, I have two view controllers and I have two different banner views, I don't have to manage the ads? All I have to do is provide the banner view real estate?
Generally speaking, if I used to have iAd for ads and also in-app. purchases through iTunes, then what is the modern day trend? Am I supposed to have ads through AdMob and keep in-app. purchases as they are through Apple? Is that what people are doing now?
Thanks in advance for your answers. I know this maybe too general, but I really want some sort of a fundamental understanding where to head, before I submit anything to Apple.
--
Here is the code for animation I am using:
- (void)adViewDidReceiveAd:(GADBannerView *)bannerView
{
bannerDidLoad = true;
[UIView animateWithDuration:1.0 animations:^{
bannerView.alpha = 1.0;
bannerView.frame = CGRectMake(bannerView.frame.origin.x, bannerView.frame.size.height, bannerView.frame.size.width, bannerView.frame.size.height);
} completion:^(BOOL finished) {
nil;
}];
}
You should really narrow your question down. It's kind of vague. Anyways, yes GADBannerView's will be clear if they fail to receive an ad. Using the delegate methods to know what state the GADBannerView is in is the standard. Animating the alpha property should not be an issue. Not really sure what that last question is asking. You can use any ad network you'd like. If you're using in app purchases already just continue using them and remove the GADBannerView instead of the ADBannerView.

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.

iAd and other banners

In my application I'd like to show cycling iAd banners and another kind of "banners" made by myself.
The problem is that I don't know which could be the best practice.
I'd like to show iAd banner in a 5:1 ratio, that means for five of my banners I will show 1 time the iAd banner, every changes will be triggered by a timer of 10s. That means that the iAd banner will be hidden for 50 sec, shown for 10 and so on.
Will Apple complain about that? does this influence my revenue in the iAd network?
If you are artificially limiting the amount if time the iAd is shown (which is normally more than 10s), I believe you won't be paid for that impression.
A better solution would be to listen to the banner view's delegate and hide it only when it tells you it can't find an ad.

my iad is still being displayed when I change from one screen to the next

I have successfully implemented iAd into my App just this past week, but when my fill rate was very low I looked into it, and I realize I have a problem. My iAd banner is correclty displayed on the first screen the user sees, and that is the only screen on which the banner ad is displayed by my design. I setup a singleton class to manage the ads, and I'm expanding it to display on additional screens in an upcoming release. However, when I push another view controller to the front that doesn't display ads, my iAd delegate methods:
- (void)bannerViewDidLoadAd:(ADBannerView *)banner
- (void) bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error
are still being called every 3 minutes as though the view is active.
Is there a way to temporarily disable iAd from trying to refresh? thanks in advance.
Since I'm not showing ads on all of the pages, I create/release the ad object when my view controller that is showing ads is displayed/not-displayed (and set the delegate to nil), and this prevents any ads/delegate functions on view controllers that are not currently displayed from being displayed.

Resources