我試圖添加一個谷歌廣告,我不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