AdMob未在iOS模拟器中展示广告

Jay*_*tos 8 iphone admob ios

我正在尝试在应用上使用AdMob(专为iOS 4.0而构建)

我添加了教程http://code.google.com/mobile/ads/docs/ios/fundamentals.html中提供的示例代码,其中包含以下内容(我已更改了adUnitID):

// 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 = @"XYZ";

// 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_];
[self.view bringSubviewToFront:bannerView_];

GADRequest * request = [GADRequest request];

// Initiate a generic request to load it with an ad.
[bannerView_ loadRequest:request];
Run Code Online (Sandbox Code Playgroud)

这样做没有任何反应,没有显示广告,我的AdMob应用页面中的请求数量也不规律地增加(即:我似乎无法注意到某种模式),但最重要的是没有显示广告.

如果我添加以下代码:

GADRequest * request = [GADRequest request];

request.testDevices = [NSArray arrayWithObjects:
                       GAD_SIMULATOR_ID,                               // Simulator
                       nil];

// Initiate a generic request to load it with an ad.
[bannerView_ loadRequest:request];
Run Code Online (Sandbox Code Playgroud)

我得到了"成功!你现在已准备好通过App Galaxy"默认横幅,但只有这一个.

所以我的问题是:

  • 示例代码不足以显示广告吗?为什么我从未看到包含示例代码的广告?
  • 据我所知,请求是指我的应用要求展示广告的次数.我也明白,不是每个请求都会被广告回复(否则填充率将是100%),但是,我仍然看到广告,我做错了什么?

提前致谢.

rus*_*afi -3

在设备中尝试一下。模拟器中的应用程序不显示 Admob 广告。