リンクを使用してプロジェクトGoogle Admob
を作成するためにフォローアップを開始しましたが、常にエラーが発生します:
Xcode
Swift3
FireBase
class AppDelegate: UIResponder, UIApplicationDelegate { Thread 1: signal SIGABRT }
ポッドの更新をさらに実行し、
私のコード: Appdelegate.swift
//I has import Firebase and GoogleMobileAds
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
FIRApp.configure()
//GADMobileAds.configure(withApplicationID: "ca-app-pub-3940256099942544~1458002511")
return true
}
ViewController.swift
//I has import Firebase and GoogleMobileAds
let kBannerAdUnitID = "ca-app-pub-3940256099942544/2934735716"
class ViewController: UIViewController, GADBannerViewDelegate, GADInterstitialDelegate {
@IBOutlet weak var bannerView: GADBannerView!
override func viewDidLoad() {
super.viewDidLoad()
self.bannerView.adUnitID = kBannerAdUnitID
self.bannerView.rootViewController = self
self.bannerView.load(GADRequest())
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}