0

I just published an application on the App Store with an iAd banner. When I downloaded it to check for the advertisement, I just saw a plain white horizontal rectangle even though it says "Live: This app is receiving live ads." in development.

enter image description here

adView = [[ADBannerView alloc] initWithFrame:CGRectZero];
[adView setCurrentContentSizeIdentifier:ADBannerContentSizeIdentifierLandscape];
[adView setDelegate:self];
[self.view addSubview:adView];
[self.view bringSubviewToFront:adView];
    - (BOOL)bannerViewActionShouldBegin:(ADBannerView *)banner willLeaveApplication:(BOOL)willLeave
    {
        return YES;
    }

Everything in my performance chart is zero, except for the 715 requests. What does this mean?

Also, is it possible for iAd to determine the user's location so that apple can put ads from local companies? For example, the user is in Japan, will iAd only show ads from Japan?

Daniel Storm
  • 18,301
  • 9
  • 84
  • 152
SeongHo
  • 1,040
  • 2
  • 15
  • 39
  • Are you only displaying the iAd Banner when you actually receive an ad (and, likewise, hiding it if there's an error)? Don't just set it visible when the view loads! Also, pretty sure iAd automatically takes geography into account with the ads it displays. – Kitsune Aug 10 '12 at 03:27
  • no, it's just there, always there. Does that really affects displaying live ads from apple? – SeongHo Aug 10 '12 at 03:35
  • 1
    You should only display the ad dynamically, resizing the other elements on the interface to make room when you get an ad and showing the banner, as well adjusting the other elements to fill all the space when a banner can't be loaded and hiding the banner widget. Otherwise you will end up with white space like that. Generally, apps will get rejected if they don't correctly deal with ads failing to load as well! – Kitsune Aug 10 '12 at 03:40

3 Answers3

0

Does it work in the simulator, i don't think it's a programming error but rather a technical error from apples side. Manny developers is experiencing this: Can not see iAd in program?

Community
  • 1
  • 1
0

I think there is no ad available so your app receives a nil value. I don't see any check for that, so regardless if it's nil or not, your app tries to display what it got, which may be nil. So you end up with a blank ad with no link what you see there.

I suggest in the next version to check for that and/or use some fallback method like AdMob or something.

Cajunluke
  • 3,103
  • 28
  • 28
skytz
  • 2,201
  • 2
  • 18
  • 23
0

You need to check if your ADBannerView received an ad or not and then display or hide it accordingly.

-(void)bannerViewDidLoadAd:(ADBannerView *)banner {
        // Display banner
        adView.alpha = 1.0;
}

-(void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error {
        // Hide banner
        adView.alpha = 0.0;
}
Daniel Storm
  • 18,301
  • 9
  • 84
  • 152