2014年3月21日 星期五

Google AdMob

1.import Framework
  • CoreData.framework
  • AdSupport.framework
  • SystemConfiguration.framework
  • MessageUI.framework
  • AudioToolbox.framework
  • StoreKit.framework
  • CoreTelephony.framework
  • AVFoundation.framework
2.Project → Targets → Build Settings → Other Linker Flags的地方加上「-ObjC」


3.設定測試狀態

- (GADRequest *)createTestRequest{
      GADRequest *request = [GADRequest request];
      request.testDevices = [NSArray arrayWithObjects:GAD_SIMULATOR_ID, @"你的實機ID", nil];
      return request;
}

4.設定loadRequest測試參數

將

[bannerView_ loadRequest:[GADRequest request]];

改為

[bannerView_ loadRequest:[self createTestRequest]];

沒有留言:

張貼留言