iAD issue on updating app.... when ads are not available

Discussion in 'iOS Programming' started by stera8, Sep 25, 2014.

  1. stera8, Sep 25, 2014
    Last edited by a moderator: Sep 25, 2014

    stera8 macrumors member

    Joined:
    Aug 21, 2014
    #1
    My app update became rejected with a 7.2 rejection that the iAd should not display if there is no ad. In my last update I included a new view controller. Slapped on iAD but it is using the same code and H and M files.

    Here is my code I submitted.

    Code:
    #pragma mark iAd Delegate Methods
    
    -(void)bannerViewDidLoadAd: (ADBannerView *)banner {
    
    [UIView beginAnimations: nil context: nil];
    
    [UIView setAnimationDuration:1];
    
    [banner setAlpha:1];
    
    [UIView commitAnimations];
    
    }
    
    -(void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error {
    
    [UIView beginAnimations: nil context: nil];
    
    [UIView setAnimationDuration:0];
    
    [banner setAlpha:0];
    
    [UIView commitAnimations];
    }
    It has been approved in the past... so now I was given this code snippet from apple

    Code:
    Banner View Delegate to Remove a Banner View When Advertisements are Not Available:
    
    - (void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error
    {
    if (self.bannerIsVisible)
    {
    [UIView beginAnimations:@"animateAdBannerOff" context:NULL];
    // assumes the banner view is at the top of the screen.
    banner.frame = CGRectOffset(banner.frame, 0, -banner.frame.size.height);
    [UIView commitAnimations];
    self.bannerIsVisible = NO;
    }
    }
    Should I take out my banner didFailToReceiveAdWithError and simple replace it with their code?

    Also I searched and found this : App rejected because of hidden whenever ad content is not being served by iAd

    which brings me to, my app iAD is on the bottom of a landscape iPad...do I need to do anything else? Thank you for the help


    Thank you
     
  2. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #2
    I don't know much about ads but I think your code hides the banner but doesn't put anything in its place. Their code looks like it zooms the frame offscreen. So the hiding UI is slightly different. Maybe they like their way better.
     
  3. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #3
    Can you provide screenshots of what your screen looks like with and without an ad? That should give us an idea of what we're dealing with. Thanks.
     
  4. stera8 thread starter macrumors member

    Joined:
    Aug 21, 2014
    #4
    I'll try to get a few tomorrow. But to describe it is pretty basic. When iAD is not working, it's a white rectangle.

    What confuses me is that my other app has been approved with the exact same iAd coding lol
     
  5. Zelda macrumors member

    Joined:
    Aug 10, 2014
    #5
    Your earlier app must have slipped through the cracks, leaving a white rectangle is the issue, as far as i know.
     
  6. stera8 thread starter macrumors member

    Joined:
    Aug 21, 2014
    #6
    Yeah, I just resubmitted my other app to fix the issue.

    To update...I found an easy tutorial that helped..

    iAD implementation

    However, now my issue is (which I commented on the tutorial asking) is that in my app you have a main screen and then you have three other screens. You arrive there via modals on a button press. My three sections are "buddy mode", "assessment mode", and "class mode". When I code it in with the above tutorial, it does not load on the title screen. That is fine since once I click into a mode the ad will load up. However if I go home, and then into another mode...an ad does not appear... any suggestions to get ads on all three of my modes?

    app is in the iPad store "Goal Rubric"--free
     

    Attached Files:

Share This Page