FIRApp.Configure Crashing App(FIRApp.Configure Crashing App)
我正在使用Xcode和Swift。 我的应用程序一直崩溃并说“尚未配置默认应用程序”。 但我确实在我的appDelegate中进行了配置。 有没有人遇到过这个问题?
I am using Xcode and Swift. My application keeps crashing and saying "The default app has not been configured yet." But I do have it configuring in my appDelegate. Has anyone encountered this issue?
最满意答案
我在AppDelegate中使用override init()方法来配置Firebase。 Firebase文档显示了didFinishLaunchingWithOptions方法中的配置,但我还没有在我的应用程序中使用该方法。
import UIKit import Firebase @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? override init() { FIRApp.configure() } func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { return true } }I use the override init() method in the AppDelegate to configure Firebase. The Firebase documentation shows the configuration in the didFinishLaunchingWithOptions method but I haven't gotten that approach to work in my apps.
import UIKit import Firebase @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? override init() { FIRApp.configure() } func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { return true } }更多推荐
appDelegate,配置,Swift,应用,电脑培训,计算机培训,IT培训"/> <meta name="descr
发布评论