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

  • Home
  • SEARCH
  • 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 3996774
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T07:19:13+00:00 2026-05-20T07:19:13+00:00

I am having trouble implementing ADBannerView and its delegate protocol. I implemented the following

  • 0

I am having trouble implementing ADBannerView and its delegate protocol.

I implemented the following code in my view class (also made the view conform to the ADBannerViewDelegate protocol):

//add iAds
ADBannerView *adView = [[ADBannerView alloc] initWithFrame: CGRectMake(0, 318, 320, 50)];
adView.requiredContentSizeIdentifiers = [NSSet setWithObjects: ADBannerContentSizeIdentifierPortrait, ADBannerContentSizeIdentifierLandscape, nil];
adView.delegate = self; 
//adView.delegate = ADBannerViewDelegate;
[self.view addSubview: adView];

then I created a class for the ADBannerViewDelegate, with the following .m

//
//  ADBannerViewDelegate.m
//

#import "ADBannerViewDelegate.h"

@implementation ADBannerViewDelegate

- (void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error{
    NSLog(@"bannerview did not receive any banner due to %@", error);}

- (void)bannerViewActionDidFinish:(ADBannerView *)banner{NSLog(@"bannerview was selected");}

- (BOOL)bannerViewActionShouldBegin:(ADBannerView *)banner willLeaveApplication:(BOOL)willLeave{return willLeave;}

- (void)bannerViewDidLoadAd:(ADBannerView *)banner {NSLog(@"banner was loaded");}

@end

the banners are eventually presented but the console keep throwing the following type of errors:

2011-02-27 15:00:54.108 app[31639:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x6356a40 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}

and the delegate functions are not doing anything , so no NSLog at all. Obviously not catching the errors.

I am stumped. I guess I am missing something in the linkage of the Adbanner view calls in the view and the delegate. Not sure how to do it or what is wrong.

Any help? Thanks in advance.

Jason

  • 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-05-20T07:19:13+00:00Added an answer on May 20, 2026 at 7:19 am

    The reason why is you told the AdBannerView that you are its delegate but you never put it in your implementation file. Your implementation file should look like this (notice the line with @implmentation):

    //
    //  ADBannerViewDelegate.m
    //
    
    #import "ADBannerViewDelegate.h"
    
    @implementation ADBannerViewDelegate<ADBannerViewDelegate>
    
    - (void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error{
        NSLog(@"bannerview did not receive any banner due to %@", error);}
    
    - (void)bannerViewActionDidFinish:(ADBannerView *)banner{NSLog(@"bannerview was selected");}
    
    - (BOOL)bannerViewActionShouldBegin:(ADBannerView *)banner willLeaveApplication:(BOOL)willLeave{return willLeave;}
    
    - (void)bannerViewDidLoadAd:(ADBannerView *)banner {NSLog(@"banner was loaded");}
    
    @end
    

    And also you shouldn’t name your class ADBannerViewDelegate. Your class should be a delegate (respond to it) to ADBannerView but not be named after it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having trouble implementing a nested class who's constructor is initialized with some of
Having trouble with the following segment of code. I'm getting a parameter count mismatch.
I'm having trouble implementing this jQuery plugin for dynamic forms while following this tutorial
I have a small class hierarchy that I'm having trouble implementing copyWithZone: for. I've
I was having trouble implementing namedtuple._replace() , so I copied the code right off
In some code requiring subclassing of inner traits/classes I'm having trouble successfully implementing an
I am having trouble implementing the bootstrap carousel. Can anyone look at the following
Problem: I am having trouble implementing a recursive image lazy load in all relevant
I'm having trouble implementing this step: Given I am logged in as a Facebook
I'm creating my own dictionary and I am having trouble implementing the TryGetValue function.

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.