我在我的应用程序中显示添加,但是iPhone5 device
中不显示添加,而simulator
中显示。
我正在使用这样的代码-
-(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");
}
}
新增内容会显示在模拟器上,但不会显示在iPhone设备上。请帮忙。
最佳答案
我认为您正在使用测试广告,但是IOS 6测试广告不支持该设备后,请禁用该测试广告,然后您才能在真实设备中看到这些广告
看到这个链接https://developers.google.com/mobile-ads-sdk/docs/admob/intermediate#ios-testing
关于ios - 广告未在iPhone5上展示,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/19627830/