Hello , When I run the app on the iphone simulator all is ok , with test advertisement written , this happens also when i debug it on my ipod touch. When I click on the ads it confrim that the ads are running corretcly. But when I download the app from the app store , no ads are there.
How ?
PS : I'm from Belgium , are the ads disable in Belgium ?
Look at the code please :
In the .h file :
Code:
#import <UIKit/UIKit.h>
#import <iAd/iAd.h>
@interface DV : UIViewController {
IBOutlet UITextView *desLabel;
IBOutlet UILabel *titleLabel;
ADBannerView *adBannerView;
}
@property (nonatomic, retain) IBOutlet UITextView *desLabel;
@property (nonatomic, retain) IBOutlet UILabel *titleLabel;
@property (nonatomic, retain) ADBannerView *adBannerView;
@end
Code:
- (void)viewDidLoad {
[super viewDidLoad];
adBannerView = [[ADBannerView alloc] initWithFrame:CGRectMake(0.0, 366.0, 320.0, 50.0)];
adBannerView.requiredContentSizeIdentifiers = [NSSet setWithObject:ADBannerContentSizeIdentifier320x50];
adBannerView.currentContentSizeIdentifier = ADBannerContentSizeIdentifier320x50;
[adBannerView setHidden:YES];
adBannerView.delegate = self;
[self.view addSubview:adBannerView];
}
- (void)bannerViewDidLoadAd:(ADBannerView *)banner {
[banner setHidden:NO];
}
- (void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error {
[banner setHidden:NO];
}
- (void)dealloc {
[adBannerView release];
[super dealloc];
}