我在我的应用程序中显示添加,但添加并未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 设备上。请帮忙。