0

When I test my app on my device, from Xcode, the iAd works, but when I have uploaded it to the App Store and test it on a friend's iPhone, it's just white!

Here is my code:

.h:

@interface pinpongViewController : UIViewController {


ADBannerView *banner; 

}


@property (nonatomic, assign)BOOL bannerIsVisible;
@property (nonatomic, retain)IBOutlet ADBannerView *banner;



@end

.m:

@synthesize banner, bannerIsVisible;



-(void)bannerViewDidLoadAd:(ADBannerView *)abanner {
if (!self.bannerIsVisible) {
    [UIView beginAnimations:@"animatedAdBannerOn" context:NULL];
    banner.frame = CGRectOffset(banner.frame, 0.0, 50.0);
    [UIView commitAnimations];
    self.bannerIsVisible = YES;
}
}

-(void)bannerView:(ADBannerView *)aBanner didFailToReceiveAdWithError:(NSError *)error {
if (!self.bannerIsVisible) {
    [UIView beginAnimations:@"animatedAdBannerOff" context:NULL];
    banner.frame = CGRectOffset(banner.frame, 0.0, -320.0);
    [UIView commitAnimations];
    self.bannerIsVisible = NO;
}
}


@end
jscs
  • 63,694
  • 13
  • 151
  • 195
  • Where are you creating your **ADBannerView**, and how are you adding it to the **UIViewController**? Also, is this the only banner in your entire application? If not, keep in mind you have to share a single instance between multiple views. – Craig Otis Nov 08 '11 at 17:56
  • The banner is an IBOutlet, so I presume it's simply being created from the xib. – larsacus Nov 08 '11 at 21:40
  • Several things you could check as @pat mentioned, if you have enabled iAd network for you app? If so, wait for a few days, let people download and use your app, then the iAds will show up. My case is, ads showed up after 30+ downloads 4 business days after my release. – antonio081014 Nov 12 '13 at 22:36
  • See http://stackoverflow.com/questions/19229207/how-long-do-iad-apps-take-to-start-generating-impressions – jjxtra Feb 01 '14 at 16:58

1 Answers1

2

Have you enabled the iAd network for your app, before submitting to the app store? It is required to enable iAd network(in iTunes connect) or else only a white screen appears! Hope this helps.

pat
  • 1,119
  • 2
  • 12
  • 20