My application explodes when I try to log into the iPhone from the simulator. This is a new project and I am following the Firebase docs . When I fill both input fields and then press the enter button, the simulator crashes withThread 1: breakpoint 1.1
LoginVC:
import UIKit
import Firebase
import FirebaseAuth
class LoginVC: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
}
@IBOutlet weak var loginEmailInput: UITextField!
@IBOutlet weak var loginPasswordInput: UITextField!
@IBAction func loginPressed(_ sender: Any) {
if let email = loginEmailInput.text, let password = loginPasswordInput.text {
FIRAuth.auth()?.signIn(withEmail: email, password: password) { (user, error) in
}
}
}
}
I added my application id to the Firebase console. The correct containers are installed. Posted FIRApp.configure()in didFinishLaunchingWithOptions. I am lost. Did I miss something?
I have import Firebasein AppDelegate.swift. Do I need to import it into other controllers?
source
share