Search code examples
iosxcodefirebaseappdelegatesigabrt

Firebase.configure() in xCode cause Thread 1: signal SIGABRT : terminating with uncaught exception of type NSException on App Delegate


Firebase.configure causes crash on App delegate file once I run, showing the following next to app delegate class

Thread 1: signal SIGABRT

In console, it shows :

37 ??? 0x0000000000000001 0x0 + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)

Any help please?

Note: I have Google .plist file on the project , and the right one ( I tried several times in like 8 or 10 project till now, no success)

Pod installed :

Installing Firebase (4.3.0)
Installing FirebaseAnalytics (4.0.4)
Installing FirebaseCore (4.0.8)
Installing FirebaseInstanceID (2.0.4)
..

Code :

import UIKit 
import Firebase

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?


func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    // Override point for customization after application launch.

    FirebaseApp.configure()
    return true
}

Please help me out, I really need it and it's been 2 days and like 12 hours infront of xCode


Solution

  • This issue seems to be happening when 'GoogleService-Info.plist' file is missing within your project path. Delete the existing 'GoogleService-Info.plist'. Download again from the Firebase service, and add the '.plist' File, make sure you select the correct project target. Once added, clean and build again.