Navigation Menu

Skip to content

Commit

Permalink
per apple, we must hide the iAd if no ads are available
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Haynie committed Jul 5, 2010
1 parent aaf61c3 commit 782d970
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions iphone/Classes/TiUIiOSAdView.m
Expand Up @@ -116,6 +116,9 @@ - (BOOL)bannerViewActionShouldBegin:(ADBannerView *)banner willLeaveApplication:

- (void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error
{
// per Apple, we must hide the banner view if there's no ad
[self.proxy replaceValue:NUMBOOL(NO) forKey:@"visible" notification:YES];

if ([self.proxy _hasListeners:@"error"])
{
NSMutableDictionary *event = [NSMutableDictionary dictionary];
Expand Down

2 comments on commit 782d970

@sjsingh
Copy link

@sjsingh sjsingh commented on 782d970 Jul 5, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did apple contact you guys to make this change?

@caioiglesias
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apple was rejecting Titanium apps because of this, that's why.

http://developer.appcelerator.com/question/41481/hide-iad-until-ad-is-ready

Please sign in to comment.