Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
728 views
in Technique[技术] by (71.8m points)

iphone - iAd not working on iPad

I made an iPhone Application which uses iAd. On the iPhone Simulator and the Device it works fine. It already is on the App Store.

Today, one of my customers told me that iAd is not showing up on the iPad. So I build my app on the iPad Simulator and it is not showing up, while the iPhone Simulator / iPhone Device work like expected.

I never test which device it is before displaying something, so this can not be the error.

This one does not show up any error: - (void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error

Any ideas?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

If you want to use iAd, you pretty much need to be a universal app. My iPhone-only iAd app when run on an iPad in compatibility mode (on the simulator or on a real iPad) would call bannerViewDidLoadAd but then displayed a blank space instead of an ad. The Apple "iAd Implementation Best Practices" doc says:

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share

2.1m questions

2.1m answers

62 comments

56.6k users

...