2

I want to add many ADBanners in my application. What's preferred: share one banner in all view controllers, or create an ADBanner for each viewController?

Ahmed Said
  • 1,285
  • 5
  • 16
  • 28
  • You'll probably have less work and a cleaner implementation if you decide to go with one shared banner. As mentioned by samfisher you shouldn't be keeping unvisible iAd's alive anyway. – Rok Jarc Mar 04 '12 at 18:19
  • but won't this reduce my ads impressions? Won't be better to get an ad for every view shown to increase ad impressions? – Ahmed Said Mar 04 '12 at 19:24
  • In a way yes, but it will reduce your **unseen** ad impressions, which is good. Impressions loaded to hidden iAd banners are not good in any way. – Rok Jarc Mar 04 '12 at 19:32
  • What do you mean by "are not good in any way", do you mean not be counted in revenue? – Ahmed Said Mar 05 '12 at 15:25
  • 1
    Because Apple counts the number of impressions. A lot of unseen impressions will reduce your click-trough-rate (and therefore your revenue). Reason is simple: if the user can't see an impression (ad) he can't click it. – Rok Jarc Mar 05 '12 at 15:31
  • You mean that only the clicked ads are counted as "impressions"? – Ahmed Said Mar 05 '12 at 15:37
  • No. Impressions are only those ads, that are visible to the user for a certain amount of time. But many hidden iAd banners would generate a lot of requests. If your app generates a lot of requests and doesn't 'produce' many impressions - then your fill rate will fall. – Rok Jarc Mar 05 '12 at 15:51
  • So if my adbannerview is set to hidden or is not shown to the user, it won't receive any ads from the network? – Ahmed Said Mar 06 '12 at 07:48
  • You will: that's the problem. Your hidden adbannerviews are still sending the requests and they are receiving adds. But this adds don't count as impressions. From Apples's point of view that makes your app ineffective. – Rok Jarc Mar 06 '12 at 09:32
  • In my application, I don't toggle the banner postion (off/on screen) when ads are (not available/avaiable). I rather toggle the banner visibility (banner.hiddin = YES/NO), in this case, would not my loaded ads be counted as impression because they are loaded while the banner.hidden = YES even if the hidden will be NO as soon as the ad is loaded? – Ahmed Said Mar 07 '12 at 07:54
  • 2
    NO. adbanner has a timer implemented. if it's not visible for certain ammount of time (i think it's 30s, not sure) it will not count as an impression. And it knows if it's on the screen on top of other views or not. – Rok Jarc Mar 07 '12 at 09:24
  • Thank you. Your answers give me some sort of relief :) – Ahmed Said Mar 07 '12 at 10:55
  • rokjarc: How do you know this is true? It would be very good news if it is: Only need to hide an iAd to stop all impressions (after 30sec.). – Doug Null Nov 29 '12 at 16:38

2 Answers2

5

it does not really matter if you want to create a ad banner for each view.

but you need to keep in mind the best practices from documentation:

Banner View Best Practices

  • Only create a banner view when you intend to display it to the user. Otherwise, it may cycle through ads and deplete the list of available advertising for your application.

  • If the user navigates from a screen of content with a banner view to a screen that does not have a banner view, and you expect them to be on that screen for a long period of time, remove the banner view from the view hierarchy, set its delegate to nil and release it before transitioning to the new screen of content. More generally, avoid keeping a banner view around when it is invisible to the user.

  • When your application creates a banner view, there is a delay before the view can actually display an advertisement. If you intend to use that banner view on a screen of content that is only visible to the user for a short period of time, the banner may not have enough time to download an advertisement before a user finishes interacting with that screen of content. Instead, your application should create a single banner view and use it throughout your user interface. As the user navigates around your application, your application moves the banner view onto any screen that is expected to display a banner. The iAdSuite sample demonstrates how to implement this technique.

  • When an ad transitions to a rich media experience, iAd consumes additional memory so that it can display an interactive ad to the user. This memory comes from your application’s available memory. Your application must scale back its activities to allow the ad to run smoothly and respond quickly to low-memory conditions by releasing large objects that can be easily recreated after the user finishes interacting with the ad.

Saurabh Passolia
  • 8,099
  • 1
  • 26
  • 41
  • I want to ask an informative question (not real scene): If I put two banners in the same view, will the server provide 2 ads for the two banners, or will serve only one banner? – Ahmed Said Mar 04 '12 at 19:15
  • @AhmedSaid: it would, but it would most probably get your app rejected on app store (or app would get bad reviews by users). I think it's mentioned somewhere in documentation. – Rok Jarc Mar 04 '12 at 19:33
  • And what about a hidden adbannerview? would it still be served? and if so, would these hidden loaded ads be counted in calculating revenue? – Ahmed Said Mar 05 '12 at 15:24
  • @Ahmed: hidden adbanners will get served but will have (overall) negative influence on your revenue. They increase 'requests', they don't 'increase' impressions, they don't increase 'click-troughs'. All of this is BAD. Don't forget to read Darren's answer, too. – Rok Jarc Mar 06 '12 at 09:35
  • But, when it is served (sent ads) by the server, how the server could know if it's hidden or not? I mean how the server knows that this sent ad should not be counted as an "impression" because the adbannerview is hidden? – Ahmed Said Mar 07 '12 at 07:22
  • 2
    @AhmedSaid: banner is communicating to server. Banner 'knows' if it's on the visible screen and on top of other views. Try it out, if you don't belive it - you can test this: create a banner and a view over it. You'll get in console something like: iAd has been loaded but it's view is obstructed. You don't have to believe everything here: you can alway try it out :) Banner that is not visible for a certain ammount of time **does not** coun't as an impression. – Rok Jarc Mar 07 '12 at 09:27
3

I prefer to create a singleton class for ads and just call the same view into each view when displayed. That way you don't have to call for a new advert on each view. I've posted singleton code for adwhirl here is it a good practice to delete the AdBannerView on viewWillDisappear and add it back on viewWillAppear? which you should be able to ammend for just iAd

Community
  • 1
  • 1
Darren
  • 10,182
  • 20
  • 95
  • 162