我已将Firebase .plist导入我的项目以及所有相关的广告连播,例如:(Firebase,FirebaseDatabase,FirebaseAuth,FirebaseCore,FirebaseInstanceID)但是,即使我的代码与我的代码类似,我仍然会收到此错误一个在Firebase's docs。
有什么问题?
编辑:实际代码:
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
解决了这个问题