9

I've built my app this way and everything seems to be working more or less. After hearing about the notoriously low iAd fill rate I decided that this would be the best method, but I tried googling it and i couldnt find record of anyone else implementing ads in their app like this. Does this violate the TOS?

D-Nice
  • 4,772
  • 14
  • 52
  • 86

6 Answers6

10

Why not use Adwhirl. Its great sdk that enables you to do exactly what you need. You can set priority settings for different ad networks which can be changed on the fly if you find one network performing better than others etc.

It handles all the logic for which ad to show based on request failure or priority without you needing to worry about it. All you do is create an adwhirl view and request an ad. Adwhirl does the rest, including appropriate refreshing. If an iAd fails first time, and then shows an admob, but the next iAd loads successfully, it will be shown instead of the admob, assuming you set iAd as a higher priority network.

http://adwhirl.com

Jasarien
  • 58,279
  • 31
  • 157
  • 188
  • This is the solution I decided upon, but I'm having some issues come up after I implemented AdWhirl. Most importantly, the app will request an ad on startup and fail only to never make another request! Often times i load the app and the app will never get to neither adWhirlDidReceiveAd: nor adWhirlDidFailToReceiveAd:. Also, my iAd requests always fail so I cant even see the ad frame that I need in order to visually finish the integration of the ads into my app! – D-Nice Sep 05 '10 at 05:08
  • How's your fillrate with iAds ? Are you getting some ads at all ? – Goles Sep 09 '10 at 05:36
  • adwirl doesn't support ARC yet. – user4951 Oct 25 '12 at 01:46
  • 2
    Adwirl is not longer supported since October 2013 because Google acquired it and now Google promotes AdMob instead. – estemendoza Oct 07 '13 at 20:59
  • @estemendoza this is true, however, I think AdWhirl still operates. But you're right, AdMob and it's mediation library is better for new projects going forward. – Jasarien Oct 08 '13 at 09:16
3

You can use these controls to show iAds as well as adMob both

iAdPlusAdMob

CJPAdController

Or here is nice tut that explain step by step

http://mobile.tutsplus.com/tutorials/iphone/supplementing-iad-placement-with-admob/

Isuru
  • 30,617
  • 60
  • 187
  • 303
Nagendra Tripathi
  • 923
  • 12
  • 23
3

Are you hiding the ADBannerView by setting visible to NO? With the ADBannerView, if you set visible to NO, then it stops asking for ads. To "hide" the ADBannerView, you need to translate it to someplace off screen.

GKYYC
  • 31
  • 1
1

I have iAds and Admob.

I highly recommending loading an iAd first and if you dont get an Ad use admob. iAd has a much higher ECPM than admob if you get an ad. Remember that iAd refreshes every 30s so the did not get ad method will be called several times.

My app has been approved you can get it, Octopus Oracle. http://kurl.ws/Ay

John Ballinger
  • 7,380
  • 5
  • 41
  • 51
  • Great, thanks for that information. Two admob ads were appearing on screen and I was able to solve it after realizing that the iad fail method is getting called every 30 seconds. How are you handling the case where iAd initially fails, you successfully place an admob ad in the view, then iAd succeeds some time after that. Can such a situation every occur? – D-Nice Sep 02 '10 at 23:39
  • I think I hide the iAd view, just in case. What I probably would do is put the iAd view back in and remove admob. iAd will make you quite a bit more money. – John Ballinger Sep 03 '10 at 01:31
1

You can use AdWhirl and its best tutorial is here Tutorial

0

I ended up with this strategy:

first of all I have created 2 outlets from the storyboard, one for the ADBannerView and another for the GADBannerView

@IBOutlet weak var iadBannerView: ADBannerView!
@IBOutlet weak var adMobBannerView: GADBannerView!

In your viewDidLoad you can do this:

override func viewDidLoad() {
    super.viewDidLoad()
    self.iadBannerView.hidden = true
    self.adMobBannerView.hidden = true
    self.iadBannerView.delegate = self
    NSTimer.scheduledTimerWithTimeInterval(35, target: self, selector: Selector("dispalyGoogleBanner"), userInfo: nil, repeats: false)
}

So here you hidden both banners (if you prefer you can do it directly in storyboard). then you wait 35 second before to display the google ads. So before to display the google ads you basically want to see if iAD it's available.

this is the method used to display the google banner:

 //MARK: - Google banner
    func dispalyGoogleBanner() {
        if !self.isDisplayIAD && !idDisplayADMob {
        idDisplayADMob = true
        self.adMobBannerView.adUnitID = kAdUnitID
        self.adMobBannerView.hidden = false
        self.adMobBannerView.rootViewController = self
        self.adMobBannerView.loadRequest(GADRequest())
        }
    }

so before to display the google banner, we ensure that the iAD banner and the adMob banner are not displayed yet. If that it's the case, then we can send the request to display the ADMob banner.

Here my implementation of the ADBannerViewDelegate

func bannerViewDidLoadAd(banner: ADBannerView!) {
        self.iadBannerView = banner
        self.iadBannerView.hidden = false
        self.adMobBannerView.hidden = true
        idDisplayADMob = false
        self.view.layoutIfNeeded()
    }

    func bannerView(banner: ADBannerView!, didFailToReceiveAdWithError
        error: NSError!) {
            println(error)
            isDisplayIAD = false
            self.iadBannerView.hidden = true
            self.dispalyGoogleBanner()
    }

    func bannerViewActionDidFinish(banner: ADBannerView!) {
        self.iadBannerView = banner
        self.iadBannerView.hidden = true
        isDisplayIAD = false
        dispalyGoogleBanner()
    }

    func bannerViewWillLoadAd(banner: ADBannerView!) {
        //remove the google banner if displayed
        isDisplayIAD = true
        self.iadBannerView.hidden = false
        self.adMobBannerView.hidden = true
        idDisplayADMob = false
        self.view.layoutIfNeeded()
    }

what I basically did on these delegates it's to check if the iAD banner it's available, if that it's case then I'll hidden the adMob banner. If the iAD finished to display the ads, then I'll call the ADMob banner see bannerViewActionDidFinish

You can easily adapt this logic tu your implementation.

Max_Power89
  • 1,710
  • 1
  • 21
  • 38