views:

93

answers:

1

I am testing an iAd app on an iPod touch. My iPod is connected to the internet. In all my testing, I have only received one callback to didFailToReceiveAdWithError.

Here is the relevant code:

#ifdef mAppHasAds 
- (void)bannerViewDidLoadAd:(ADBannerView *)banner {
    NSLog (@"Triangle ad");
    bannerView.hidden = NO;
}

- (void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error {
    NSLog (@"No Triangle ad");
    bannerView.hidden = YES;
}
#endif

And here are some of the NSLogs I am seeing. Note that some of the timestamps are 1 minute or 1 min 30 sec apart. To me, this indicates that ads failed to arrive. But there was no callback.

2010-07-25 20:11:36.403 UniversalTriangleSolver[10490:307] Triangle ad 2010-07-25 20:12:35.684 UniversalTriangleSolver[10490:307] Triangle ad 2010-07-25 20:13:05.684 UniversalTriangleSolver[10490:307] Triangle ad 2010-07-25 20:13:35.684 UniversalTriangleSolver[10490:307] Triangle ad 2010-07-25 20:14:35.686 UniversalTriangleSolver[10490:307] Triangle ad 2010-07-25 20:16:05.689 UniversalTriangleSolver[10490:307] Triangle ad 2010-07-25 20:17:35.691 UniversalTriangleSolver[10490:307] Triangle ad 2010-07-25 20:19:05.693 UniversalTriangleSolver[10490:307] Triangle ad 2010-07-25 20:19:19.915 UniversalTriangleSolver[10490:307] ADManager: did enter background 2010-07-25 20:19:19.940 UniversalTriangleSolver[10490:307] ADManager: will terminate

A: 

I see it differently -- If your app failed to receive an ad, it would log "No Triangle Ad" -- but it never does.

I think your code "bannerView.hidden = NO" isn't pushing the view to the display.

Want to try this instead?

- (void)bannerViewDidLoadAd:(ADBannerView *)banner
{
 if (!self.bannerIsVisible)
 {
   [UIView beginAnimations:@"animateAdBannerOn" context:NULL];
   // banner is invisible now and moved out of the screen on 50 px
   banner.frame = CGRectOffset(banner.frame, 0, 50);
   [UIView commitAnimations];
   self.bannerIsVisible = YES;
 }
}
Jesse Wolgamott
I see the banner view on the display.
William Jockusch
I agree with Jesse that your callback is actually - (void)bannerViewDidLoadAd:(ADBannerView *)banner
vodkhang
Thank you both for your responses. But I am confused . . . the bannerViewDidLoadAd callback is arriving just fine. The NSLogs prove it. It's the other one that isn't coming. And yet you are both trying to correct the callback that is arriving.Am I missing something?
William Jockusch
@William -- I think both vodkhang and I are saying that it's not arriving because the system is not failing to receive an ad.
Jesse Wolgamott
The problem I have with that hypothesis lies in the timing of the callbacks to bannerViewDidLoad Ad. Several times, there is a gap of 1 min 30 sec between two successive callbacks -- see the NSLogs. In other words, at some 30 second intervals, neither callback is firing.
William Jockusch
Gotcha -- Sorry, I don't see anything that would indicate a failure for ads to load. the phone may have just been busy for that time.
Jesse Wolgamott