Keep session started with Firebase

Hi, i'm a student of computing and i've do my interships and need some help
Well, i have this code:
import UIKit
import Firebase
import FirebaseAuth
import SwiftLoader

typealias Completion = (_ errorMessage: String, _ data: AnyObject?) -> Void

class Login: NSObject {

static let shared = Login()

func createUser(email:String?, password:String?, name:String?) {
    if email == nil || password == nil || name == nil {
        alertGestion(title: "Signup Error!", message: "All fields are required.")
    } else {
        
        SwiftLoader.show(animated: true)
        
        Auth.auth().createUser(withEmail: email!, password: password!) { (user, error) in
            if user == nil {
                SwiftLoader.hide()
                self.alertGestion(title: "Signup Error!", message: error.unsafelyUnwrapped.localizedDescription)
            } else {
                let user = Auth.auth().currentUser
                if let user = user {
                    let changeRequest = user.createProfileChangeRequest()
                    
                    changeRequest.displayName = name
                    changeRequest.commitChanges { error in
                        if let err = error {
                            SwiftLoader.hide()
                            self.alertGestion(title: "Signup Error!", message: err.localizedDescription)
                        } else {
                            WriteData.shared.createUser(uid: user.uid, email: user.email, name: user.displayName, completion: { (status, message) in
                                SwiftLoader.hide()
                                if !(user.isEmailVerified) {
                                    self.sendEmailVerification()
                                }
                            })
                        }
                    }
                } else {
                    SwiftLoader.hide()
                }
            }
        }
    }
}

func signIn(email:String?, password:String?) {
        if email == nil || password == nil {
            alertGestion(title: "Login Error!", message: "All fields are required.")
        } else {
            SwiftLoader.show(animated: true)
        }
        Auth.auth().signIn(withEmail: email!, password: password!) { (user, error) in
            SwiftLoader.hide()
            if let err = error {
                self.alertGestion(title: "Login Error!", message: err.localizedDescription)
            } else  {
                if !(user?.isEmailVerification){ //Here i have a error an this error is: Value of type 'AuthDataResult' has no member 'isEmailVerification'
                    self.sendEmailVerification()
                }else{
                    self.alertGestion(title: "", message: "Has iniciado sesiĆ³n correctamente")
                }
            }
        }
    }

I think that because this error, when i start session in my app with Firebase only lunch the alert that say that i start session but not start session really, how i can solved this?

Hi Dave, I highly encourage you to try asking on platforms like Stackoverflow or in the Firebase Slack workgroup for help to such questions. This forum is focused on pure Swift and not about Apple or 3rd party frameworks, that's why this topic was tagged as #off-topic. Best regards Adrian.