Search code examples
ios-simulatoriadios-universal-appiad-workbench

iAd testing ads on real device confusion


I want to use test ads on my iPad/iPhone universal app. Do I have to download iAd producer in order to use test ads? With iAd producer I must create my own ads and only those are the ads I can show to users? Or do I have to have a iAd workbench account to launch test ads on my device or is there another way to get test ads for my device and simulator?


Solution

  • You don't have to do any of those to test ads

    -(void)bannerViewDidLoadAd:(ADBannerView *)banner{
    
    [UIView beginAnimations:nil context:nil];
    
    [UIView setAnimationDuration:0];
    
    [iAdBanner setAlpha:1];
    
    [UIView commitAnimations];
    
    [self.iAdBanner setDelegate:self];
    
    
    }
    
    
    
    -(void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error{
    
    
    
     [bannerView setDelegate:self];
      [bannerView setAlpha:0];
       bannerView.hidden=YES;
    
         }
    

    Just add the above code and an iAd test banner should appear .