アプリで Admob を使用しています。
次のエラーが表示されます: [GADDelegateManager didYouNilOutYourDelegate:selector:] at GADDelegateManager.m:48
Admob Banner オブジェクトを dealloc で解放しています。
このエラーの修正方法を教えてください。
-(void)displayAds {
self.aBannerView.adUnitID = AdmobPublisherID;
[self.aBannerView setDelegate:self];
[self.aBannerView setRootViewController:roorViewController];
if (isAdLoaded) {
[self.view addSubview:self.aBannerView];
} else {
// Initiate a generic request to load it with an ad.
[self.view addSubview:self.aBannerView];
[self.aBannerView loadRequest:[self createRequest]];
isAdLoaded = YES;
}
}
#pragma mark GADRequest generation
- (GADRequest *)createRequest {
GADRequest *request = [GADRequest request];
request.testDevices = [NSArray arrayWithObjects: nil];
return request;
}
- (void)adViewDidReceiveAd:(GADBannerView *)adView {
NSLog(@"Received ad successfully popup");
if(self.aBannerView !=nil) {
self.aBannerView.hidden = NO;
}
}
- (void)adView:(GADBannerView *)view didFailToReceiveAdWithError:(GADRequestError *)error {
NSLog(@"Failed to receive ad with error: %@", [error localizedFailureReason]);
[self.aBannerView removeFromSuperview];
[self showInhouseAd];
}
- (void)adViewWillLeaveApplication:(GADBannerView *)bannerView {
}
- (void)dealloc {
[aBannerView release];
}
ありがとう、