I\'m building my first iOS application, and I am using Firebase to handle authentication, database, etc. I added a sign up screen and used the following code to create a new
This is other solution about this issue. 1/ Check in the "AppDelegate.swift" we will see as below
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
FirebaseApp.configure()
return true
}
2/ Remove "FirebaseApp.configure()" from above code to
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
3/ Add below code into "AppDelegate.swift"
override init() {
FirebaseApp.configure()
}
4/ Go to "ViewController.swift" and add the code
if FirebaseApp.app() == nil {
FirebaseApp.configure()
}
5/ Build again and Run it's will work. Thanks!