AdMob ad is showing in iOS simulator, but not on iDevice

Posted by Ben Toscano on Stack Overflow See other posts from Stack Overflow or by Ben Toscano
Published on 2012-06-17T05:05:20Z Indexed on 2012/06/18 15:16 UTC
Read the original article Hit count: 263

Filed under:
|
|
|

As the heading states, I can get my AdMob Ad to show in the iOS 5.1 and 6.0 simulator just fine, however, when running my application on my iOS 5.1.1 or 6.0 devices, there is just a blank space where the ad should be served. The code in my .m file is as follows:

bannerView_ = [[GADBannerView alloc] initWithFrame:CGRectMake(0.0,
                                                            411.0 -
                                                            GAD_SIZE_320x50.height,
                                                            GAD_SIZE_320x50.width,
                                                            GAD_SIZE_320x50.height)];
bannerView_.adUnitID = @"**myID**";
bannerView_.rootViewController = self;
[self.view addSubview:bannerView_];
[bannerView_ loadRequest:[GADRequest request]];

//GADRequest *r = [[GADRequest alloc] init];
//r.testing = YES;
//[bannerView_ loadRequest:r];

Furthermore, if I initiate testing of ads (see commented-out section), the test ad shows on both the simulator AND my iDevices, which is baffling me! What am I missing? Thanks for your help.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about ios