我之前创建了一个应用程序,此代码在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