2013-09-24 3 views
1

아이폰 앱에 adBannerView를 삽입했습니다. 문서에 설명 된 사과 예제를 따릅니다. 앱이 디버그 모드에서 실행되면 광고가 올바르게 표시됩니다 (테스트 버전).하지만 출시 버전에서는 실제 사용자가 앱을 사용할 때 배너가 표시되어야하는 흰색 상자가 표시됩니다.iOS - 최종 버전에서 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]; 

} 
+2

iTunes에서 광고를 연결 했습니까? – giorashc

답변

0

음 테스트를하지만, 실제 사용자 그때는 아마 만들어지지 때 작동하는 경우 iTunes의 응용 프로그램 관리에서 iads를 사용하지 않는 일반적인 실수는 쉽지 않습니다.

아직 완료하지 않은 경우 광고를 활성화하는 방법은 here을 참조하십시오.

왜 고통 스럽습니까? 업로드를 기다리는 상태로 애플리케이션 상태를 변경해야하므로 앱에서 다른 검토를 기다려야하기 때문입니다. (새 이진 ​​파일을 업로드 한 후)

또 다른 이유는 iads 노출 수가 너무 높기 때문일 수 있습니다. 앱의 모든 광고 요청에 노출로 답장되지 않으므로 몇 분 정도 기다려보십시오. 가 표시됩니다.

+0

감사합니다 giorashc, 젠장! :) 나는이 버전이 "판매 준비 중"상태 인 직후에 활성화했다고 생각합니다. 다음 버전이 승인 될 때까지 기다려야합니다. – tylyo

+0

그래, 실망 스럽지만 업데이트는 새로운 바이너리보다 빨리 검토해야하지만 어떻게 작동합니까? – giorashc

+0

giorashc 맞습니다! 이제 배너가 보입니다. 앱을보고 싶다면 :) [Easy Receipts] (https://itunes.apple.com/us/app/easy-receipts/id693054121) – tylyo