Created
April 5, 2017 15:27
-
-
Save rcerrejon/867039c605852121897263d5f4f2c93c to your computer and use it in GitHub Desktop.
Admob loader (with test)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import GoogleMobileAds | |
class ViewController: UIViewController { | |
@IBOutlet weak var bannerView: GADBannerView! | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
// Do any additional setup after loading the view, typically from a nib. | |
// Admob | |
let request = GADRequest() | |
request.testDevices = ["##deviceID##"] | |
bannerView.adUnitID = "##bannerapp-id##" | |
bannerView.rootViewController = self | |
bannerView.load(request) | |
} | |
override func didReceiveMemoryWarning() { | |
super.didReceiveMemoryWarning() | |
// Dispose of any resources that can be recreated. | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment