【发布时间】:2017-08-01 01:24:25
【问题描述】:
我猜这个很快
我正在尝试在我的应用中使用 Firebase 数据库,并且我正在按照教程中的说明进行安装。在我的 AppDelegate 中,我已经输入了所需的代码:
import UIKit
import Firebase
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
FirebaseApp.configure()
return true
}
在我要使用数据库的视图控制器中,我尝试声明一个 FIRDatabaseReference
var ref:FIRDatabaseReference!
但后来我收到了这条消息:
Use of undeclared type 'FIRDatabasereference'
我能做什么?我也已经在这个特定的视图控制器中导入了 Firebase
【问题讨论】:
标签: ios swift firebase firebase-realtime-database