【发布时间】:2016-09-19 15:09:29
【问题描述】:
我有一个 iOS (Swift) 应用,在 AppDelegate 中有以下代码:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
FIRApp.configure()
FIRDatabase.database().persistenceEnabled = true
return true
}
应用程序在 persistenceEnabled = true 行崩溃,FIRAppNotConfigured 和消息 "Failed to get default FIRDatabase instance. Must call FIRApp.configure() before using FIRDatabase." 除外
显然,在此之前我已致电FIRApp.configure(),因此建议的解决方案不正确。调用时,日志输出甚至显示"Configuring the default app"。
问题可能是什么,我该如何解决它以便我可以使用 FIRDatabase?
【问题讨论】:
标签: ios firebase firebase-realtime-database