简体   繁体   English

广告未在iPhone5上展示

[英]Ads not showing on iPhone5

i am showing adds in my app, but adds are not showing in iPhone5 device only showing in simulator . 我正在我的应用程序中显示添加,但iPhone5 device中未显示添加,而仅在simulator显示。

i am using code like this - 我正在使用这样的代码-

-(void)showAdds
{
   {

    if ((UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad))
    {

        bannerView = [[GADBannerView alloc]
                      initWithFrame:CGRectMake(128.0,
                                               670 ,
                                               GAD_SIZE_728x90.width,
                                               GAD_SIZE_728x90.height)];
        bannerView.adUnitID = @"8c9b7de0880d478b";
    }
    else {

        if ([[UIScreen mainScreen] bounds].size.height == 568)
        {
            bannerView = [[GADBannerView alloc]
                          initWithFrame:CGRectMake(120,
                                                   [[UIScreen mainScreen] bounds].size.height - GAD_SIZE_320x50.height ,
                                                   GAD_SIZE_320x50.width,
                                                   GAD_SIZE_320x50.height)];
            bannerView.adUnitID = @"a151d69e8127bd7";
            NSLog(@"ads");
        }
        else
        {
            bannerView = [[GADBannerView alloc]
                          initWithFrame:CGRectMake(80,
                                                   [[UIScreen mainScreen] bounds].size.width - GAD_SIZE_320x50.height ,
                                                   GAD_SIZE_320x50.width,
                                                   GAD_SIZE_320x50.height)];
            bannerView.adUnitID = @"a151d69e8127bd7";
            NSLog(@"ads");

        }

    }

adds are showing on simulator but not on iPhone device. 新增内容会显示在模拟器上,但不会显示在iPhone设备上。 Please help. 请帮忙。

我认为您正在使用测试广告,在IOS 6测试广告不支持该设备之后,请禁用该测试广告,然后您会在真实设备中看到广告,请参阅此链接https://developers.google.com/mobile-ads -sdk /文档/ AdMob广告/中间#IOS-测试

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM