GADInterstitial未在设备上显示

时间:2014-07-25 11:09:00

标签: ios admob

我已在模拟器上运行该应用并且广告正在展示但是当我连接设备并在其上运行应用时,广告不会显示。

任何人都可以指导我应遵循的步骤,以解释为什么不显示

#pragma mark interstiital ads

-(void) setupInterstitialAdView {

interstitial_ = [[GADInterstitial alloc] init];
interstitial_.adUnitID = @"Ad_ID_Here";
interstitial_.delegate = self;
[interstitial_ loadRequest:[self request]];

}

- (GADRequest *)request {
GADRequest *request = [GADRequest request];

// Make the request for a test ad. Put in an identifier for the simulator as well as any devices
// you want to receive test ads.
request.testDevices = @[@"my ID here"
                        // TODO: Add your device/simulator test identifiers here. Your device identifier is printed to
                        // the console when the app is launched.
                        GAD_SIMULATOR_ID
                        ];
return request;
}

#pragma mark GADBannerViewDelegate implementation
-(void)interstitialDidReceiveAd:(GADInterstitial *)ad {
NSLog(@"Received interstitial ad successfully");
[interstitial_ presentFromRootViewController:self];

}

0 个答案:

没有答案