首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >IOS10,Xcode8.2 Google Admob问题

IOS10,Xcode8.2 Google Admob问题
EN

Stack Overflow用户
提问于 2016-12-20 13:10:50
回答 1查看 124关注 0票数 0

我让follow up Google Admob get start创建了一个带有Swift3FireBase链接的Xcode项目,但总是得到错误:

class AppDelegate: UIResponder, UIApplicationDelegate { Thread 1: signal SIGABRT }

运行pod更新的时间更长了,

我的代码: Appdelegate.swift

代码语言:javascript
复制
//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

代码语言:javascript
复制
//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.
        }
    }
EN

回答 1

Stack Overflow用户

发布于 2016-12-20 20:03:22

对不起,我找到答案了,我忘了把我的项目链接到Firebase了。忘记将GoogleService-info.plist添加到我的项目中。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41235287

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档