2012-05-18 1 views
1

최근 Apple에서 승인 한 애플리케이션을 개발했습니다. 그러나 문제는 iAd가 iAd에서 iAd가 완벽하게 보이고있는 것처럼 어디에서 아이폰에 나타나지 않는지입니다. 개발 당시 iAd는 iPhone 및 iPad에서 테스트 광고로로드되고 작업되었습니다. 하지만 애플의 승인을받은 후 iAd가 아이폰에로드되지 않고 ipad에로드 중임을 점포에서 애플리케이션을 다운로드했습니다. 나는 다른 응용 프로그램에서 아이폰에 다른 응용 프로그램을 확인했습니다. iAd는 정상적으로 작동하지만 응용 프로그램에서는 iAd가로드되지 않습니다. iphone을 iphone에로드하려면 어떻게해야합니까? 내가 응용 프로그램에서 사용iAd가 iPhone에로드되지 않고 Apple의 승인을 받아 iPad에로드되었습니다.

내 코드

-(void)showiAdInView 
{ 
if (!appDelegate.isUpgraded) { 
    bannerView = [[ADBannerView alloc] init]; 
    bannerView.delegate = self; 
    bannerView.backgroundColor = [UIColor colorWithWhite:1.0f alpha:0.005f]; 
    bannerView.hidden = TRUE; 
    bannerIsVisible = FALSE; 
    [self.view addSubview:bannerView]; 
} 
} 
-(void)bannerViewDidLoadAd:(ADBannerView *)banner 
{ 
bannerIsVisible = YES; 
bannerView.hidden = FALSE; 
NSLog(@"ADBanner is Showing"); 
[self bannerViewShow]; 
} 
-(void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error 
{ 
bannerIsVisible = FALSE; 
bannerView.hidden = TRUE; 
NSLog(@"ADBanner is Hidding"); 
NSLog(@"%@",[error description]); 
[self bannerViewHide]; 
} 

-(BOOL)bannerViewActionShouldBegin:(ADBannerView *)banner willLeaveApplication: (BOOL)willLeave 
{ 
if ([self.captureSession isRunning]) { 
    [self.captureSession stopRunning]; 
    iAdLoaded = TRUE; 
} 
return YES; 
} 
-(void)bannerViewActionDidFinish:(ADBannerView *)banner 
{ 
UIInterfaceOrientation interfaceOrientation = [[UIApplication sharedApplication] statusBarOrientation]; 
[self willRotateToInterfaceOrientation:interfaceOrientation duration:0.2f]; 
if (![self.captureSession isRunning] && iAdLoaded) { 
    [self.captureSession startRunning]; 
    iAdLoaded = FALSE; 
} 
} 
-(void)bannerViewShow 
{ 
[bannerView setBackgroundColor:[UIColor colorWithWhite:1.0f alpha:0.005f]]; 
UIInterfaceOrientation interfaceOrientation = [[UIApplication sharedApplication] statusBarOrientation]; 
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) 
{ 
    if (UIInterfaceOrientationIsPortrait(interfaceOrientation)) { 
     [UIView beginAnimations:nil context:nil]; 
     [UIView setAnimationDelegate:self]; 
     [UIView setAnimationDuration:0.5]; 
     [MsgtextView setFrame:MsgTextVwAdBannerFrame]; 
     [UIView commitAnimations]; 
     adBannerFrame = CGRectMake(0, 190, 320, 50); 
     clearButton.frame = CGRectMake(ClearButtonFramePotrait.origin.x, ClearButtonFramePotrait.origin.y, ClearButtonFramePotrait.size.width, ClearButtonFramePotrait.size.height); 
     [self.view bringSubviewToFront:bannerView]; 
     [bannerView setFrame:adBannerFrame]; 
     [bannerView setCurrentContentSizeIdentifier:ADBannerContentSizeIdentifierPortrait]; 

    } 
    else if (UIInterfaceOrientationIsLandscape(interfaceOrientation)) { 
     [UIView beginAnimations:nil context:nil]; 
     [UIView setAnimationDelegate:self]; 
     [UIView setAnimationDuration:0.5]; 
     [MsgtextView setFrame:CGRectMake(MsgTextVwAdBannerFrame.origin.x, MsgTextVwAdBannerFrame.origin.y, MsgTextVwAdBannerFrame.size.width, MsgTextVwAdBannerFrame.size.height+8)]; 
     [UIView commitAnimations]; 
     adBannerFrame = CGRectMake(0, 105, 470, 32); 
     clearButton.frame = CGRectMake(ClearButtonFrameLandscape.origin.x, ClearButtonFrameLandscape.origin.y, ClearButtonFrameLandscape.size.width, ClearButtonFrameLandscape.size.height); 
     [bannerView setCurrentContentSizeIdentifier:ADBannerContentSizeIdentifierLandscape]; 
     [self.view bringSubviewToFront:bannerView]; 
     [bannerView setFrame:adBannerFrame]; 

    } 
} 
else if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) { 
    if (UIInterfaceOrientationIsPortrait(interfaceOrientation)) { 
     [UIView beginAnimations:nil context:nil]; 
     [UIView setAnimationDelegate:self]; 
     [UIView setAnimationDuration:0.5]; 
     [MsgtextView setFrame:MsgTextVwAdBannerFrame]; 
     [UIView commitAnimations]; 
     adBannerFrame = CGRectMake(0, 640, 768, 50); 
     [bannerView setCurrentContentSizeIdentifier:ADBannerContentSizeIdentifierPortrait]; 
     clearButton.frame = CGRectMake(ClearButtonFrame_iPadPotrait.origin.x, ClearButtonFrame_iPadPotrait.origin.y, ClearButtonFrame_iPadPotrait.size.width, ClearButtonFrame_iPadPotrait.size.height); 
     [self.view bringSubviewToFront:bannerView]; 
     [bannerView setFrame:adBannerFrame]; 
    } 
    else if (UIInterfaceOrientationIsLandscape(interfaceOrientation)) { 
     [UIView beginAnimations:nil context:nil]; 
     [UIView setAnimationDelegate:self]; 
     [UIView setAnimationDuration:0.5]; 
     [MsgtextView setFrame:CGRectMake(MsgTextVwAdBannerFrame.origin.x, MsgTextVwAdBannerFrame.origin.y, MsgTextVwAdBannerFrame.size.width, MsgTextVwAdBannerFrame.size.height+8)]; 
     [UIView commitAnimations]; 
     adBannerFrame = CGRectMake(0, 325, 1024, 32); 
     [bannerView setCurrentContentSizeIdentifier:ADBannerContentSizeIdentifierLandscape]; 
     clearButton.frame = CGRectMake(ClearButtonFrame_iPadPotrait.origin.x, ClearButtonFrame_iPadPotrait.origin.y, ClearButtonFrame_iPadPotrait.size.width, ClearButtonFrame_iPadPotrait.size.height); 
     [self.view bringSubviewToFront:bannerView]; 
     [bannerView setFrame:adBannerFrame]; 
    } 
} 
} 
-(void)bannerViewHide 
{ 
[bannerView setBackgroundColor:[UIColor clearColor]]; 
UIInterfaceOrientation interfaceOrientation = [[UIApplication sharedApplication] statusBarOrientation]; 
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) 
{ 
    if (UIInterfaceOrientationIsPortrait(interfaceOrientation)) { 
     [UIView beginAnimations:nil context:nil]; 
     [UIView setAnimationDelegate:self]; 
     [UIView setAnimationDuration:0.5]; 
     [MsgtextView setFrame:MsgTextVwFrame]; 
     clearButton.frame = ClearButtonFramePotrait; 
     [bannerView setHidden:YES]; 
     [UIView commitAnimations]; 
    } 
    else if (UIInterfaceOrientationIsLandscape(interfaceOrientation)) { 
     [UIView beginAnimations:nil context:nil]; 
     [UIView setAnimationDelegate:self]; 
     [UIView setAnimationDuration:0.5]; 
     [MsgtextView setFrame:MsgTextVwFrame]; 
     clearButton.frame = ClearButtonFrameLandscape; 
     [bannerView setHidden:YES]; 
     [UIView commitAnimations]; 
    } 
} 
else if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) { 
    if (UIInterfaceOrientationIsPortrait(interfaceOrientation)) { 
     [UIView beginAnimations:nil context:nil]; 
     [UIView setAnimationDelegate:self]; 
     [UIView setAnimationDuration:0.5]; 
     [MsgtextView setFrame:MsgTextVwFrame]; 
     clearButton.frame = ClearButtonFrame_iPadPotrait; 
     [bannerView setHidden:YES]; 
     [UIView commitAnimations]; 
    } 
    else if (UIInterfaceOrientationIsLandscape(interfaceOrientation)) { 
     [UIView beginAnimations:nil context:nil]; 
     [UIView setAnimationDelegate:self]; 
     [UIView setAnimationDuration:0.5]; 
     [MsgtextView setFrame:MsgTextVwFrame]; 
     clearButton.frame = ClearButtonFrame_iPadPotrait; 
     [bannerView setHidden:YES]; 
     [UIView commitAnimations]; 
    } 
} 
} 

답변

3

말게가 전반적으로 매우 낮은 충전 속도를 가지고 있었다. 광고 네트워크 (iAd 포함)는 클릭률이 높을수록 더 많은 광고를 보냅니다. 즉, 앱에서 광고를 클릭 한 사용자와 앱에 표시 한 광고의 비율입니다. 테스트 광고가 작동하고 앱을 출시했다는 것을 확인했다면, 애플이 아이폰 용으로 광고 파일을 보내고있는 중이다. 며칠주고 어떻게되는지보십시오.

"isUpgraded"코드가 표시됩니다. 테스트중인 iPhone에서 업그레이드를 구입하고 잊어 버렸으므로 더 이상 광고를 반환하지 않을 수 있습니까?

+0

코드가 아이폰과 ipad 모두 동일하지만 ipad에서 iad가 꽤 좋지만 iphone에서 iad가로드되지 않는 경우 iphone에 대한 많은 요청이 있지만 itunesconnect iad 네트워크에서 보았습니다. 그 인상이 ipad에 의해 행해졌다고 생각하는 인상은 거의 남지 않았습니다. 그래서 제발 나 에게이 문제를 없애 버릴 수 또는 제발 내가 사과 같은 문제에 관한 문의해야합니다 – Sumanth

+0

아이폰에있는 상점에서 응용 프로그램을 구입 have'nt, 기능의 일부는 응용 프로그램에서 차단 된 평가판 버전입니다 차단됩니다 . 그리고 ipad에서 잘 작동합니다. – Sumanth

+0

iPhone에서 상점에서 라이브 앱을 가져 오지 않았다면 어떻게 작동하지 않는지 어떻게 알 수 있습니까? – WendiKidd

관련 문제