關於廣告的問題,國內的可能水都很深,數據 就上了,直接說加 SDK
1,加入 以下framework
coreMedia .framewordk,
coreTelephony.framewordk,
AudioToolbox.framewordk,
MediaPlayer.framewordk,
MessageUI.framewordk,
storekit.framework,
MediaPlayer,
EventKitUI,
EventKit,
AdSupport.framework 這個庫要注意,蘋果後臺要設置對了 這個庫黑我好多次了
2,把 SDK 加到工程中,下載地址 http://download.csdn.net/detail/a287971/8338719
3,
#import "GADBannerView.h"
GADBannerView *bannerView_;
bannerView_ = [[GADBannerView alloc]
initWithFrame:CGRectMake(0.0,
self.view.frame.size.height-113,
GAD_SIZE_320x50.width,
GAD_SIZE_320x50.height)];
bannerView_.adUnitID = @"ca-app-pub-4604023153892773/4960498111"; // 這裏換成你自己的<pre name="code" class="html">adUnitID
bannerView_.rootViewController = self; [self.view addSubview:bannerView_]; [bannerView_ loadRequest:[GADRequest request]];
4, other linker Flags 設置成 -ObjC