2
我有一個的iOS(SWIFT)應用程序與所述的AppDelegate以下代碼:iOS的火力地堡應用FIRApp.configure()
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?
先生,您值得數百萬個點 – JamesG