CoderCody CoderCody - 3 months ago 62
Swift Question

FIRApp.Configure Crashing App

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?screenshot

Answer

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
    }
}
Comments