iAd不适用于iPad

问题描述:

我做了一个iPhone应用程序它使用iAd。在iPhone模拟器和设备上,它工作正常。它已经在App Store上。iAd不适用于iPad

今天,我的一位客户告诉我,iAd没有在iPad上显示。所以我在iPad模拟器上构建我的应用程序,并且它不显示,而iPhone模拟器/ iPhone设备按预期工作。

我从来不会在显示某个东西前测试它是哪个设备,所以这不能是错误。

这一个不显示任何错误:- (void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error

任何想法?

我有类似的问题。对我来说唯一的解决方案是使应用程序通用。一旦通用应用程序,iAds就开始工作。

您可能会注意到,甚至一些来自iAds套件形式Apple的应用程序也无法正常工作。他们提到在这方面他们这里说明服用点:

http://developer.apple.com/library/ios/#samplecode/iAdSuite/Introduction/Intro.html

The BasicBanner and ContainerBanner are configured to support both iPhone and iPad idioms, the TabbedBanner and NavigationBanner to support only the iPhone idiom, and the SplitViewBanner to support only the iPad idiom.

我发现的唯一区别是通用与iPhone应用程序设置(靶>摘要 - >设备组合框)。

Hoever,如果我没有记错,我的- (void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error被称为。该错误说的是,没有可用的iAds。

此外,我只尝试在iOS5(模拟器和设备)。

希望这将帮助你一点;)

更新:还要检查这太问题的情况下,你使用的是一些旧的SDK: Is iAds not available for iPad apps?

+0

@达尔文这对您有帮助吗?如果问题不是我的答案中的原因,请分享您的发现?我很想听听那个;)谢谢。 – 2012-04-25 12:38:45

+0

链接到iAdSuite示例代码已死亡(*“对不起,该页面无法找到”*)。 – Pang 2016-02-02 01:20:29

如果你想使用iAd的,你很可能需要成为一款通用应用。在兼容模式下(在模拟器上或真正的iPad上)在iPad上运行时,我的仅限iPhone的iAd应用程序会调用bannerViewDidLoadAd,但会显示空白区域而不是广告。苹果“的iAd实施最佳实践”医生说:

Create Universal Apps 

To ensure your app is capable of displaying iAd banners for all your users, 
make sure you’ve developed a universal app that supports all possible devices. 
**iPhone apps running in compatibility mode on iPad will not display a test ad 
in development or live ads in deployed apps.** 

https://developer.apple.com/library/ios/technotes/tn2264/_index.html

作为替代答案,刚刚为我工作......因为我忘了。很久很久以前,我在设置/开发者页面中将iAds的填充率设置为0%... DOOH!

所以请三重检查。