i am showing adds in my app, but adds are not showing in iPhone5 device
only showing in 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. Please help.
我认为您正在使用测试广告,在IOS 6测试广告不支持该设备之后,请禁用该测试广告,然后您会在真实设备中看到广告,请参阅此链接https://developers.google.com/mobile-ads -sdk /文档/ AdMob广告/中间#IOS-测试
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.