雖然我在模擬器測試AdMob後,它會引發下面誤差要在此設備上獲得測試廣告,請調用:request.testDevices = [NSArray arrayWithObjects:GAD_SIMULATOR_ID,nil];
向該設備上獲得測試廣告,撥打:request.testDevices = [NSArray的arrayWithObjects:GAD_SIMULATOR_ID,零]。
我的代碼
bannerView_ = [[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner];
bannerView_.adUnitID = @"8de66ecc3525495d";
bannerView_.rootViewController = self;
[self.view addSubview:bannerView_];
GADRequest *request = [[GADRequest alloc] init];
request.testing = YES;
[bannerView_ loadRequest:request];
引導我去存檔。在此先感謝..
再次相同的錯誤來了。 –
對不起,我不知道你爲什麼總是得到這個錯誤。一個問題:您的橫幅是否顯示...?或者你沒有看到任何橫幅? – Mick
我沒有得到任何橫幅,只顯示空白屏幕。其實我在模擬器中運行這個代碼。這有什麼問題嗎? –