我无法在我的应用中接收移动添加。
我的代码在这里:-
-(void) createMObAdds
{
bannerView_ = [[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner];
// Specify the ad unit ID.
bannerView_.adUnitID = @"d81cb38a93cc479";
bannerView_.rootViewController = self;
[self.view addSubview:bannerView_];
// Initiate a generic request to load it with an ad.
[bannerView_ loadRequest:[GADRequest request]];
}
- (GADRequest *)request
{
GADRequest *request = [GADRequest request];
request.testDevices = @[GAD_SIMULATOR_ID];
[request setTesting:YES];
return request;
}
- (void)adViewDidReceiveAd:(GADBannerView *)adView {
NSLog(@"Received ad successfully");
}
- (void)adView:(GADBannerView *)view didFailToReceiveAdWithError:(GADRequestError *)error {
NSLog(@"Failed to receive ad with error: %@", [error localizedFailureReason]);
}
但我收到错误:请求错误:发生网络错误。请让我知道我的代码中的问题在哪里或我需要做什么?