I have been struggling with this issue for a few days, I am a rookie and I am not able to find a solution. I am trying to create a user sign up and log in page using XCode 8.3.3 and am using Firebase as database.
My code is as follows:
import UIKit import Firebase import FirebaseAuth class SignUpViewController: UIViewController { //Outlets @IBOutlet weak var emailTextField: UITextField! @IBOutlet weak var passwordTextField: UITextField! //Sign Up Action for email @IBAction func createAccountAction(_ sender: AnyObject) { if emailTextField.text == "" { let alertController = UIAlertController(title: "Error", message: "Please enter your email and password", preferredStyle: .alert) let defaultAction = UIAlertAction(title: "OK", style: .cancel, handler: nil) alertController.addAction(defaultAction) present(alertController, animated: true, completion: nil) } else { FIRAuth.auth().createUser(withEmail: emailTextField.text!, password: passwordTextField.text!) { (user, error) in if error == nil { print("You have successfully signed up") //Goes to the Setup page which lets the user take a photo for their profile picture and also chose a username let vc = self.storyboard?.instantiateViewController(withIdentifier: "Home") self.present(vc!, animated: true, completion: nil) } else { let alertController = UIAlertController(title: "Error", message: error?.localizedDescription, preferredStyle: .alert) let defaultAction = UIAlertAction(title: "OK", style: .cancel, handler: nil) alertController.addAction(defaultAction) self.present(alertController, animated: true, completion: nil) } } } } The part that has issue is FIRAuth.auth. The error says "FIRAuth has been renamed to Auth" and if I applied such fix, although the built became successful, I could only see nothing but a white screen. If I delete the code then I can see a normal sign in screen created earlier.
Another thing is when I type import FirebaseAuth a red line appeared in the suggested word list that crossed out FirebaseAuth, I still proceeded.
Please help. I don't know why it happens. Could there be any missing pod files? Much appreciated.
Storyboard: storyboard