I use a method override init()in AppDelegate to configure Firebase. The Firebase documentation shows the configuration in the method didFinishLaunchingWithOptions, but I did not get this approach to work in my applications.
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
}
}
source
share