Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8717339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T06:16:56+00:00 2026-06-13T06:16:56+00:00

I am using Xcode 4.5 with ARC and get the following message using iAd:

  • 0

I am using Xcode 4.5 with ARC and get the following message using iAd:

WARNING: More than 10 instances of ADBannerView or ADInterstitialView currently exist. This is a misuse of the iAd API, and ad performance will suffer as a result.

I have read this post: Iad WARNING: More than 10 instances of ADBannerView but that code is without ARC it looks, which i have.

My code:

-(AppDelegate *) appdelegate {
return (AppDelegate *) [[UIApplication sharedApplication]delegate];
}

-(void) viewWillAppear:(BOOL)animated {
_UIiAD = [[self appdelegate]UIiAD];
_UIiAD.delegate = self;
adView = [[ADBannerView alloc]initWithFrame:CGRectZero];
adView.frame = CGRectOffset(adView.frame, 0, 460.0);
adView.requiredContentSizeIdentifiers = [NSSet setWithObject: ADBannerContentSizeIdentifierPortrait];
[self.view addSubview:adView];
adView.delegate = self;
self.bannerIsVisible = NO;
}

- (void) viewWillDisappear:(BOOL)animated {
_UIiAD.delegate = nil;
_UIiAD = nil;
[_UIiAD removeFromSuperview];
}

-(void)bannerViewDidLoadAd:(ADBannerView *)banner {

if(!self.bannerIsVisible) {
    [UIView beginAnimations:@"animateAdBannerOn" context:NULL];
    //banner is invisible now and moved out of the screen
    banner.frame = CGRectMake(0.0, 5.0, banner.frame.size.width, banner.frame.size.width);
    [UIView commitAnimation];
    self.bannerIsVisible = YES;

    NSLog(@"bannerViewDidLoadAd is working!");
}
}

-(void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error {
if (self.bannerIsVisible) {
    [UIView beginAnimations:@"animateAdBannerOff" context:NULL];
    //banner is visible and we move it out of the screen due to connection issues
    banner.frame = CGRectMake(0.0, -50.0, banner.frame.size.width, banner.frame.size.width);
//        [UIView commitAnimation];
    self.bannerIsVisible = NO;

    NSLog(@"didFailtoReceiveWithError is working");
}
}

-(BOOL)bannerViewActionShouldBegin:(ADBannerView *)banner willLeaveApplication:(BOOL)willLeave {
NSLog(@"Banner view is beginning an ad action");

BOOL shouldExecuteAction = YES;
if (willLeave && shouldExecuteAction) {
    // stop all interaction process in the app. Use this to stop sounds or video so the ad can display properly
    // ;
    // [sound pause];
}
return shouldExecuteAction;
}

-(void)bannerViewActionDidFinish:(ADBannerView *)banner {
// resume everything you've stopped
// ;
// ;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T06:16:57+00:00Added an answer on June 13, 2026 at 6:16 am

    Because you clear the ad from the ivar first, you are never removing the ad from the superview. Try rewriting as below:

    - (void) viewWillDisappear:(BOOL)animated {
    [_UIiAD removeFromSuperview];
    _UIiAD.delegate = nil;
    _UIiAD = nil;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the following code within XCode, building for iOS with ARC enabled. Why
Using Xcode 4.2 and ARC, I wrote the following code before I had any
I just converted an old project to ARC using Xcode's automatic refactoring. @property (nonatomic,
I am using Xcode 4.3.2 to develop iPhone apps with ARC enabled. while navigating
I'm in xCode 4.2 using ARC and Storyboard (iOS 5). I suppose to put
I'm writing an iOS 5 app (in Xcode 4.3, using Storyboards and ARC) that
Currently using Xcode 4.2 and I have two view controllers (1 and 2). I
I am using xcode 4.2 and ARC. Below is the code I am using.
I want to know if my Xcode iPhone project is using ARC, and I
I converted my huge IOS program to ARC using xcode auto conversion. After that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.