Firebase数据库引用给我一个错误

时间:2018-05-21 21:38:29

标签: swift xcode firebase firebase-realtime-database

我已将Firebase .plist导入我的项目以及所有相关的广告连播,例如:(Firebase,FirebaseDatabase,FirebaseAuth,FirebaseCore,FirebaseInstanceID)但是,即使我的代码与我的代码类似,我仍然会收到此错误一个在Firebase's docs

enter image description here

有什么问题?

编辑:实际代码:

import UIKit
import Firebase

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?


    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {

        FirebaseApp.configure()

        let myDatabase = Database.database().reference()  <- Error

        return true
    }

错误:Use of unresolved identifier 'Database'

EDIT2:我通过following these steps here

解决了这个问题

0 个答案:

没有答案