无法获取IAD / AdMob的调解器件 [英] Can't get iad/adMob to mediate on device

查看:103
本文介绍了无法获取IAD / AdMob的调解器件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用GoogleMobileAdsSDKiOS 7.0.0。我跟着谷歌的AdMob的指示设置AdMob的话,我跟着调解指导。调解与IAD / AdMob的行之有效的模拟器,但从未工程设备。 iAd的几乎没有失败,当它的AdMob测试的旗帜永远不会加载。

I'm using GoogleMobileAdsSDKiOS 7.0.0. I followed Google's AdMob instructions for setting up AdMob then I followed mediation instructions. Mediation with iAd/AdMob works well on simulator but never works on device. iAd almost never fails and when it does AdMob test banner never loads.

 - (void)viewDidLoad
{

[super viewDidLoad];



self.adView = [[ADBannerView alloc] initWithFrame:CGRectMake(0, 60, 320, 50)];  
self.adView.delegate = self;

[self.view addSubview:adView]; 
}



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

self.adView.hidden=YES;

NSLog(@"Google Mobile Ads SDK version: %@7.0.0", [GADRequest sdkVersion]);

self.adBanner_=[[GADBannerView alloc]initWithFrame:CGRectMake(0, 0, 320, 50)];

self.adBanner_.adUnitID = @"my-ID";   

self.adBanner_.rootViewController=self;

[self.view addSubview:self.adBanner_];

GADRequest *request =[GADRequest request];

request.testDevices = @[ @"2077ef9a63d2b398840261c8221a0c9b"];    

[self.adBanner_ loadRequest:request];

}

我也试过bannerViewDidLoadAd表明AD浏览报负载,但只取得了AdMob的和iAd的负载在同一时间,所以我不能用bannerViewDidLoadAd。

I also tried the bannerViewDidLoadAd to show that adView loads but that only made AdMob and iAd load at the same time so I can't use bannerViewDidLoadAd.

我不明白,为什么AdMob的/ iAd的不调和的设备还没有完全正常工作的模拟器。想不通为什么AdMob的永远加载试验旗帜设备。

I can't figure out why AdMob/iAd don't mediate on device yet work perfectly fine on simulator. Can't figure out why AdMob never loads test banner on device.

推荐答案

您应该隐藏在AD浏览viewDidLoad中,然后取消隐藏它bannerViewDidLoadAd。但是,您的code看起来不错。从我的经验与IAD / AdMob的调解需要较长时间的iAd对实际设备故障比它的模拟器。在实际的设​​备,你会看到后,iAd的失败,那么将AdMob的负载,但我会带时有发生,而不是模拟器上尽快iAd的失败,AdMob的加载之前。未等设备。这就是我拥有它。测试它,等一会。

You should hide adview in viewDidLoad and then unhide it in bannerViewDidLoadAd. However, your code looks fine. From my experience with iad/admob mediation it takes a longer time for iAd to fail on actual device than it does on simulator. On actual device, you'll see after iAd fails then AdMob will load but i'll take time before it happens as opposed to on simulator as soon as iAd fails, AdMob loads. Not so on device. That's how i have it. Test it and wait a bit.

这篇关于无法获取IAD / AdMob的调解器件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆