AdMob 広告を表示するために、アプリ (viewDidLoad
メソッド)で次のコードを使用しています。
// Create a view of the standard size at the bottom of the screen.
// Available AdSize constants are explained in GADAdSize.h.
bannerView_ = [[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner];
// Specify the ad's "unit identifier." This is your AdMob Publisher ID.
bannerView_.adUnitID = @"ABC";
// 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.
[bannerView_ loadRequest:[GADRequest request]];
そのコードを別のアプリまたはこのアプリのテーブル ビュー (ルート ビュー コントローラー) で使用すると、広告は正常に表示されます。私の中でそれを使用してUIWebView
も何も起こりません。
誰でも問題が何であるかを提案できますか?