iOS-最终版本上未显示ADBannerView

iOS-最终版本上未显示ADBannerView,ios,adbannerview,Ios,Adbannerview,我在iphone应用程序中插入了adBannerView。我遵循文档中描述的苹果示例。当应用程序在调试模式下运行时,广告会在测试版本中正确显示,但在发布版本中,当真正的用户使用该应用程序时,我会看到一个白色框,其中应该显示横幅 也许我错过了什么/忘记了什么,或者我做错了什么 显示横幅的视图控制器具有initBanner方法: - (void) initBanner{ ADBannerView *_bannerView = nil; if (!is2ShowBanner){

我在iphone应用程序中插入了adBannerView。我遵循文档中描述的苹果示例。当应用程序在调试模式下运行时,广告会在测试版本中正确显示,但在发布版本中,当真正的用户使用该应用程序时,我会看到一个白色框,其中应该显示横幅

也许我错过了什么/忘记了什么,或者我做错了什么

显示横幅的视图控制器具有initBanner方法:

- (void) initBanner{

    ADBannerView *_bannerView = nil;

    if (!is2ShowBanner){
        _bannerView = nil;
        MyLogEvidence(@"%@ BANNER da Nascondere", [self.class description]);
        return;
    }

    MyLogEvidence(@"%@ BANNER da Visualizzare", [self.class description]);


    _bannerView = [[ADBannerView alloc] initWithAdType:ADAdTypeBanner];
    [_bannerView setDelegate:self];

    CGRect bounds = self.view.bounds ;
    CGRect frame = _bannerView.frame;
    frame.origin = CGPointMake(CGRectGetMinX(bounds),CGRectGetMaxY(bounds)- _bannerView.frame.size.height);

    [_bannerView setFrame:frame];

    [self.view  addSubview:_bannerView];
}

-(void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error{

    [self layoutForBanner:banner animated:YES ];
}


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

    [self layoutForBanner:banner animated:YES];
}

- (void)layoutForBanner:(ADBannerView*)_bannerView animated:(BOOL)animated

{

    if (_bannerView == nil){

        MyLog(@"BANNER non presente");

        [_constraintVerticalForBanner setConstant:3.0];
        [self.view layoutIfNeeded];
        [self.view updateConstraintsIfNeeded];

        return;
    }


    [_bannerView setHidden:!_bannerView.bannerLoaded];

    [_constraintVerticalForBanner setConstant:_bannerView.hidden? 3.0 : _bannerView.frame.size.height+3];

        [self.view layoutIfNeeded];

        [self.view updateConstraintsIfNeeded];

        MyLog(@"%@.constraintVerticalForBanner start: %3.0f",[self.class description],_constraintVerticalForBanner.constant);

}

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

    return YES;

}
呼叫从以下位置开始:

-(void)viewDidAppear:(BOOL)animated{

    [super viewDidAppear:animated];

    [self initBanner];

}

如果它在测试时起作用,但对真正的用户不起作用,那么您可能犯了一个常见而痛苦的错误,即在itunes connect的应用程序管理下不启用IAD

如果你还没有做过,那么看看如何启用广告

为什么会痛?因为您必须将应用程序状态更改为等待上载,并且您的应用程序必须等待另一次审阅。在你上传了一个新的二进制文件后


另一个原因可能是,从我所读到的内容来看,iads的印象率不是很高,并且不是你应用程序中的每个广告请求都会有印象,所以请尝试等待几分钟,直到有一个广告显示出来。

你在itunes connect中启用了广告吗?谢谢giorashc,该死!!:我想我在这个版本处于待售状态后启用了它。我必须等待下一个版本被批准。是的,令人沮丧,但这就是它的工作原理,尽管更新应该比新的二进制文件更快地被审查。你说得对!现在横幅是可见的。。。如果您想查看应用程序::