【发布时间】:2011-11-22 17:25:06
【问题描述】:
我之前制作了一个应用程序,此代码在 5.0.1 更新之前有效,但它不适用于新应用程序。可能是什么问题?
代码如下:
{
[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”,引用自:-[GADNetworkChecker stopNetworkChecking] in libGoogleAdMobAds.a(GADNetworkChecker.o) -[GADMNetworkReachabilityWrapper unscheduleFromCurrentRunLoop] in libGoogleAdMobAds.a(GADMNetworkReachabilityWrapper.o)
-
"_SCNetworkReachabilityCreateWithName",引用自:-[GADNetworkChecker startNetworkChecking] in libGoogleAdMobAds.a(GADNetworkChecker.o) -[GADMNetworkReachabilityWrapper
-
initWithHostname:callbackDelegate:] in libGoogleAdMobAds.a(GADMNetworkReachabilityWrapper.o) "_SCNetworkReachabilityScheduleWithRunLoop",引用自: -[GADNetworkChecker startNetworkChecking] in libGoogleAdMobAds.a(GADNetworkChecker.o) -[GADMNetworkReachabilityWrapper scheduleInCurrentRunLoop] in libGoogleAdMobAds .a(GADMNetworkReachabilityWrapper.o) "_SCNetworkReachabilitySetCallback",引用自:-[GADNetworkChecker startNetworkChecking] in
-
libGoogleAdMobAds.a(GADNetworkChecker.o) -[GADMNetworkReachabilityWrapper initWithHostname:callbackDelegate:] in libGoogleAdMobAds.a(GADMNetworkReachabilityWrapper.o) "_AudioServicesPlaySystemSound",引用自:-[GADWebViewDelegate webView:shouldStartLoadWithRequest:navigationType:]在 libGoogleAdMobAds.a(GADWebViewDelegate.o) "_OBJC_CLASS_$_MFMailComposeViewController" 中,引用自:objc-class-ref 在 libGoogleAdMobAds.a(GADOpener.o) "_OBJC_CLASS_$_MFMessageComposeViewController" 中,引用自:
标签: iphone xcode4 ios5 admob ads