Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting the delegate when using canDisplayBannerAds

Tags:

ios

ios7

iad

I've been struggling to get (banner) iAds to display correctly in the iPhone, and in an iPad merely displaying the iPhone app (scaled up). I still don't know how to fix this, and haven't found anyone else having this problem.

Then I noticed that in iOS7 there's a way to automate using banner ads in an app, by setting:

self.canDisplayBannerAds=YES:

... In the viewDidLoad method. This seemed like a cool, streamlined way to implement banners, but haven't figured out how to set the delegate when using this automated method. Can one do this, or do you have to do the more manual method of creating an adBannerView, setting the delegate, and then implementing the delegate methods?

like image 404
james Burns Avatar asked Oct 01 '22 23:10

james Burns


1 Answers

You can not display iAds in compatibility mode on the iPad.

Your app must be universal for iAds to display.

Technical Note TN2264: iAd Implementation Best Practices

Additionally, the delegate methods are not forwards to your application if you are using self.canDisplayBannerAds. See here

like image 137
BytesGuy Avatar answered Oct 13 '22 10:10

BytesGuy