Cannot find type 'AuthDataResultCallBack' in scope

I need to do this:

 func logInUser(withEmail email: String, password: String, completion: AuthDataResultCallBack?) {     Auth.auth().signIn(withEmail: email, password: password, completion: completion)    }

But I keep getting an error saying: Cannot find type 'AuthDataResultCallBack' in scope

Also: 'AuthDataResult' does not behave the same as 'AuthDataResultCallBack'

Firebase is imported FirebaseCore is imported

I have no idea what to do.    

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.

Looks like a simple typo. Note that the completion handler type is AuthDataResultCallback with a lowercase b.

I am having the same issue and this is not a matter of a simple typo. The b is lowercase. I have working code using AuthDataResultCallback in an older app, but Xcode Version 14.0 beta 3 gives me the error "Cannot find type 'AuthDataResultCallback' in stop" no matter what import for firebase I add. The only difference I can think of is my old app uses Cocoapods to import Firebase, while my current app uses swift package manager. Anyone have the same issue and some luck resolving?