Search code examples
iosipadiad

iAd framework not working on iPad Pro


I have an app with a relatively rich UI hierarchy (a few collection views, some custom menu items). My app has iAd enabled and I took full advantage of the automatic iAd framework, where you just @import iAd; and then just self.canDisplayBannerAds = YES; in viewDidLoad

This works great on iPad mini, iPad 2, iPad Air, but for a reason I can't figure out, it doesn't on my iPad Pro.

Before you suggest it, no, it has nothing to do with the Developer settings for iAd's, I have the same settings of "Fill Rate 100%" and "Unlimited Ad Presentation" as in the other iPad's.

Nothing on the internet when I search for iPad Pro but product reviews...


Solution

  • Found it! I created an empty app with iAd and it did work, so it had to be something with my app. Finally realized that the significant difference was that my app was scaled to look the same size as it would on a normal iPad. A quick google search showed me that the way to have iPad Pro display an app in its native resolution is by setting the Launch Screen File in the project general settings to the main Storyboard. Once displayed in its native resolution, the app correctly displays iAd's. Apple documented it with respect to iPhone apps scaled up to iPads:

    iPhone apps running in compatibility mode on iPad will not display a test ad in development or live ads in deployed apps

    Guess they need to update the doc to include the difference with the iPad Pro: https://developer.apple.com/library/ios/technotes/tn2264/_index.html#//apple_ref/doc/uid/DTS40011827-CH1-CREATE_UNIVERSAL_APPS