点击添加。 safari打开并显示一条警告,其中包含Safari无法打开此URL的消息,因为URL无效。我使用下面的代码来测试添加。我在这段代码中遗漏了什么?
bannerView_ = [[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner];
bannerView_.rootViewController = self;
bannerView_.adUnitID = MY_BANNER_UNIT_ID;
[bannerView_ setFrame:CGRectMake(0,370 ,bannerView_.bounds.size.width, bannerView_.bounds.size.height)];
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.
UIDevice *device = [UIDevice currentDevice];
NSString *uniqueIdentifier = [device uniqueIdentifier];
request.testing = YES;
//NSLog(@"Device GUID: %@", uniqueIdentifier);
request.testDevices = [NSArray arrayWithObjects:
uniqueIdentifier,
nil];
[bannerView_ loadRequest:request];