Ios 当我尝试加载AdMob广告时,iPad崩溃

Ios 当我尝试加载AdMob广告时,iPad崩溃,ios,objective-c,ipad,admob,Ios,Objective C,Ipad,Admob,当我尝试加载AdMob广告时,我的应用程序iPad应用程序崩溃了, 这是我的代码: //Google AdMob bannerView_ = [[GADBannerView alloc] initWithFrame:CGRectMake(0.0, self.view.frame.size.height -

当我尝试加载AdMob广告时,我的应用程序iPad应用程序崩溃了, 这是我的代码:

//Google AdMob
bannerView_ = [[GADBannerView alloc] initWithFrame:CGRectMake(0.0,
                                                              self.view.frame.size.height -
                                                              GAD_SIZE_728x90.height -40,
                                                              GAD_SIZE_728x90.width,
                                                              GAD_SIZE_728x90.height)];

// Specify the ad's "unit identifier." This is your AdMob Publisher ID.
bannerView_.adUnitID = @"XXXXXXXXXXXXXX";

// 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]];

[bannerView_ release];
日志是:

2013-07-27 13:44:37.145 XXXX[4057:907] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[GADObjectPrivate changeState:]: unrecognized selector sent to instance 0x1e011f30'
*** First throw call stack:
(0x312122a3 0x390bd97f 0x31215e07 0x31214531 0x3116bf68 0x10d624 0x10f700 0x10caa0 0xea9b7 0x33039595 0x330c5353 0x33106d11 0x33105fe7 0x332283ef 0x331050c5 0x33105077 0x33105055 0x3310490b 0x33104e01 0x3302d5f1 0x3301a801 0x3301a11b 0x34d255a3 0x311e7683 0x311e6ee9 0x311e5cb7 0x31158ebd 0x31158d49 0x34d242eb 0x3306e301 0xbe065 0x394f4b20)
libc++abi.dylib: terminate called throwing an exception
(lldb) 

这里怎么了?

您缺少了
-ObjC
per:

现在需要将
-ObjC
添加到 应用程序目标的生成设置:

  • 在Xcode的项目导航器中,按蓝色的顶级项目图标
  • 单击目标,然后单击构建设置选项卡
  • 其他链接器下 标记,将-ObjC添加到调试和发布

  • 什么是日志?应用程序崩溃时出现什么错误。。。?