0

I am having some trouble with my universal app and the iAd. It is working fine on iPhones and I am having some clicks and impressions etc. Every time I look at the app on my iPad, however, I see that it isn't working at all. The code that I have used for the iPad is exactly the same as the code for the iPhone so I'm not sure why it will show on one and not on the other.

iPadViewController.h

#import <iAd/iAd.h>


@interface iPadViewController : UIViewController <ADBannerViewDelegate, UIActionSheetDelegate>{
ADBannerView *adView;
BOOL bannerIsVisible;
}
@property (nonatomic,retain) IBOutlet ADBannerView *adView;
@property BOOL bannerIsVisible;

@end

iPadViewController.m

#import "iPadViewController.h"


@implementation iPadViewController    
@synthesize bannerIsVisible;
@synthesize adView;

-(void)bannerViewDidLoadAd:(ADBannerView *)banner{
if (!self.bannerIsVisible) {
    [UIView beginAnimations:@"animateOn" context:NULL];
    [UIView commitAnimations];
    self.bannerIsVisible = YES;
}
}


-(void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error{
if(self.bannerIsVisible){
    [UIView beginAnimations:@"animateOff" context:NULL];
    [UIView commitAnimations];
    self.bannerIsVisible = NO;
}
}

I have added an iAd in the xib and linked it as adView.

Thanks in advance for any help.

1 Answer 1

0

The reason might be the different iOS versions in different devices you have. I have read that iAds is only supported in iOS 4. Your iPad might have iOS 3.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.