我之前創建了一個應用程序,此代碼在5.0.1更新之前工作,但不適用於新應用程序。可能是什麼問題呢?Admob無法正常工作?
下面的代碼:
{
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
// Do any additional setup after loading the view from its nib.
// Create a view of the standard size at the bottom of the screen.
bannerView_ = [[GADBannerView alloc] initWithFrame:CGRectMake(0.0, self.view.frame.size.height - GAD_SIZE_320x50.height, GAD_SIZE_320x50.width, GAD_SIZE_320x50.height)];
// Specify the ad's "unit identifier." This is your AdMob Publisher ID.
bannerView_.adUnitID = MY_BANNER_UNIT_ID;
// Let the runtime know which UIViewController to restore after taking
// the user wherever the ad goes and add it to the view hierarchy.
bannerView_.rootViewController = self; [self.view addSubview:bannerView_];
// Initiate a generic request to load it with an ad.
[bannerView_ loadRequest:[GADRequest request]];}
AdMob廣告SDK默認啓用日誌記錄。他們在你的控制檯上說什麼?對於架構的i386 –
未定義符號: 「_SCNetworkReachabilityUnscheduleFromRunLoop」,從引用: - 在的libGoogleAdMobAds.a(GADNetworkChecker.o)[GADNetworkChecker stopNetworkChecking] - [GADMNetworkReachabilityWrapper unscheduleFromCurrentRunLoop]在的libGoogleAdMobAds.a(GADMNetworkReachabilityWrapper.o) – user975767
「_SCNetworkReachabilityCreateWithName」,從引用: - [GADNetworkChecker startNetworkChecking]在的libGoogleAdMobAds.a(GADNetworkChecker.o) - [GADMNetworkReachabilityWrapper – user975767