You can change the completion part :
'completion: AuthDataResultCallBack?'
to
'completion: @escaping(AuthDataResult?, Error?) -> Void'
so it will be like this :
func logInUser(withEmail email: String, password: String, completion: @escaping(AuthDataResult?, Error?) -> Void) { Auth.auth().signIn(withEmail: email, password: password, completion: completion) }
it will work just fine.