Wrapper for Google ADMob
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
MOBAdvertising.xcodeproj
MOBAdvertising.xcworkspace
Modules
Pods
Sources
.gitattributes
.gitignore
LICENSE
MOBAdvertising.podspec
Podfile
Podfile.lock
README.md

README.md

MOBAdvertising

MOBAdvertising is an easy-to-use, drop-in wrapper for Google AdMob Banner Ads. Simply wrap your app in MOBAdvertising to display ads on the bottom in a jiffy.


Import with CocoaPods

  use_frameworks!
  pod 'MOBAdvertising'

Initialization and Setup

AppDelegate.swift

At the top of the file

import MOBAdvertising
var bannerViewControllered: MOBAdvertisingBanner!

Inside of "application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool"

bannerViewControllered = MOBAdvertisingBanner(view: (self.window?.rootViewController)!, AdApplicationID: "YOUR ADMOB APPLICATION ID", AdUnitID: "YOUR ADMOB AD UNIT ID", TestAds: false)
self.window!.rootViewController = bannerViewControllered;
self.window?.makeKeyAndVisible()

To Show/Hide Ads

bannerViewControllered.hideBannerView()
or
bannerViewControllered.showBannerView()

Easy as pie! Enjoy!