1、添加库CoreData.framework,AdSupport.framework,StoreKit.framework,SystemConfiguration.framework,MessageUI.framework;
先加入以上这么些,然后在 AppController.mm里面 viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
viewController.wantsFullScreenLayout = YES;
viewController.view = __glView;
//------------------- Add Admob
GADBannerView * bannerView_ = [[GADBannerView alloc] initWithAdSize:kGADAdSizeSmartBannerPortrait];
bannerView_.rootViewController = viewController;
bannerView_.adUnitID ="ca-app-pub-2174847275118262/6657323033";
GADRequest *request = [GADRequest request];
request.testing = NO;
// Set RootViewController to window
if ( [[UIDevice currentDevice].systemVersion floatValue] < 6.0)
{
// warning: addSubView doesn't work on iOS6
[window addSubview: viewController.view];
}
else
{
// use this method on ios6
[window setRootViewController:viewController];
}
[bannerView_ setFrame:CGRectMake(0, viewController.view.frame.size.height - bannerView_.frame.size.height, bannerView_.frame.size.width, banne