Note that there are some explanatory texts on larger screens.

plurals
  1. POiAd not displaying from last few days
    primarykey
    data
    text
    <p><strong>iAd error</strong>: </p> <pre><code> Error Domain=ADErrorDomain Code=3 "The operation couldn’t be completed. Ad inventory unavailable" UserInfo=0x118bb420 {ADInternalErrorCode=3, ADInternalErrorDomain=ADErrorDomain, NSLocalizedFailureReason=Ad inventory unavailable} </code></pre> <p>Can you please tell me its my coding problem or it is the problem form Apple site?</p> <p>I am allocating iAd object in App Delegate and delegates are also in App Delegate. Here is the code:-</p> <pre><code>AppDelegate *appDel=(AppDelegate*)[UIApplication sharedApplication].delegate; CGRect rect1 = CGRectMake( 0.0,300,320,50); appDel.adBanner = [[ADBannerView alloc] initWithFrame:rect1]; appDel.adBanner.requiredContentSizeIdentifiers = [NSSet setWithObject:ADBannerContentSizeIdentifierPortrait]; appDel.adBanner.currentContentSizeIdentifier = ADBannerContentSizeIdentifierPortrait; [appDel.adBanner setHidden:YES]; appDel.adBanner.delegate = self; - (void)bannerViewDidLoadAd:(ADBannerView *)banner { AppDelegate *app=(AppDelegate*)[UIApplication sharedApplication].delegate; NSLog(@"iAd load"); app.adBanner.frame=CGRectMake( 0.0,300,320,50); app.adBanner.hidden=NO; } - (void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error { AppDelegate *app=(AppDelegate*)[UIApplication sharedApplication].delegate; NSLog(@"iAd error: %@", error); app.adBanner.hidden=YES; app.adBanner.frame=CGRectMake( 0.0,350,0,0); } </code></pre> <p>Then I am adding banner in Abstract <code>UIViewConroller</code> Class</p> <pre><code>CGFloat y=0; if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { CGSize result = [[UIScreen mainScreen] bounds].size; y=result.height; } AppDelegate *app=(AppDelegate*)[UIApplication sharedApplication].delegate; CGRect rect2 = CGRectMake( 0.0,y-50,320,50); app.adBanner.frame =rect2; UIViewController *topController = [UIApplication sharedApplication].keyWindow.rootViewController; [topController.view addSubview:app.adBanner]; </code></pre> <p>Thanks in advance for the help.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload