我试图添加一个谷歌广告,我不recieving增加了,谷歌的AdMob没有显示广告
// Create a view of the standard size at the bottom of the screen.
bannerView = [[GADBannerView alloc]
initWithFrame:CGRectMake(0.0,
self.view.frame.size.height -
GAD_SIZE_320x50.height,
GAD_SIZE_320x50.width,
GAD_SIZE_320x50.height)];
// Specify the ad's "unit identifier." This is your AdMob Publisher ID.
bannerView.adUnitID = @"XXXXXXXXXXXX";
// Let the runtime know which UIViewController to restore after taking
// the user wherever the ad goes and add it to the view hierarchy.
bannerView.rootViewController = self;
///////////////////////////
[self.view addSubview:bannerView];
// Initiate a generic request to load it with an ad.
GADRequest* gadReq = [[GADRequest alloc] init];
[gadReq setTesting:YES];
[bannerView loadRequest:gadReq];
我做了什么错?
在您的实际代码中,您将用实际值替换广告单元ID,对吗? – ThomasW
对,这就是我所做的,但我不知道它现在工作正常 – user784625
如果它工作,那么你应该关闭这个问题。 – ThomasW