I had just setup firebase in my app and tried to run it on my iOS device through Xcode, after a long wait the app got installed on my phone but wouldn't launch, the error shown was as follows -
Terminating app due to uncaught exception 'com.firebase.core', reason: 'Default app has already been configured.'
This is my AppDelegate.swift file -:
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
if FirebaseApp.app() == nil {
FirebaseApp.configure()
}
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
Please help me solve this, thanks in advance.