简体   繁体   中英

Test iAd showing up on simulator, iPhone device but not iPad device

I have a tricky problem here... I hope someone will be able to help me because it's driving me crazy.

I have an Universal app that displays iAd. It is working fine on the simulator and also on an iPhone. But when I try out on an iPad it always give me this f* * * error :

Error Domain=ADErrorDomain Code=3 "The operation couldn’t be completed. Ad inventory unavailable" UserInfo=0xd6a37e0 {ADInternalErrorCode=3, NSLocalizedFailureReason=Ad inventory unavailable}

There is absolutely no reasonable explanation for that. My ad banner is not displayed in a scrollView or some crazy hierarchies. And this is really annoying. I don't know what to do and I would like to submit my app quickly :)

I found many thread with this problem and I tried there solutions: to remove the app from the device, to clean the targets, everything! Nothing worked. I tried to change the iPad clock and still nothing.

Any help would be really appreciated!

As asked here is the code to create the banner:

- (void) createIAdBanner {

//if(isIPad) return;

if(!iAdBanner) {

    iAdBanner = [[ADBannerView alloc] initWithFrame:CGRectMake(0, 0, (isIPad)?1024:320, (isIPad)?66.:50.)];
    iAdBanner.delegate = self;
    iAdBanner.requiredContentSizeIdentifiers = [NSSet setWithObject:(isIPad)?ADBannerContentSizeIdentifierLandscape:ADBannerContentSizeIdentifierPortrait];
    [adContainer addSubview:iAdBanner];
    [iAdBanner release];
}
}

Is your app a universal one??

Because iPhone apps running in compatibility mode on iPad doesn't display iAds. If you really want the ads to be working on iPad as well,make sure you design a universal app....

From the official documentation

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM