2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

  1. AdMob SDKを落とす

  1. 解凍して得られるディレクトリをvendorディレクトリ(なければ作る)の下に入れる
$ mkdir vendor
$ unzip   ~/Downloads/googlemobileadssdkios.zip 
$ mv GoogleMobileAdsSdkiOS-6.9.2/ vendor/
  1. Add-onsは消す
$ rm -r vendor/GoogleMobileAdsSdkiOS-6.9.2/Add-ons
  1. Rakefileに次を書き加える
Motion::Project::App.setup do |app|
  # 略
  app.frameworks += ["AdSupport", "AudioToolbox", "AVFoundation", "CoreGraphics", "MessageUI", "StoreKit", "SystemConfiguration", "CoreTelephony"]

  app.vendor_project('vendor/GoogleMobileAdsSdkiOS-6.9.2/', :static)
end
  1. 広告を組込みたいViewControllerにて下記を書き加える
    @banner = GADBannerView.alloc.initWithAdSize(KGADAdSizeBanner).tap do |b|
      b.adUnitID = '自分のユニットID'
      b.rootViewController = self
      b.frame = [[0, 0], [320, 50]]
      self.view.addSubview(b)
      b.loadRequest(GADRequest.request)
    end
2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?