How can I solve it this way?
Firebase, Type of expression is ambiguous without more context
Syntax seems correct according to documentation:
Auth.auth().createUser(withEmail: email, password: password) { authResult, error in }
But you do not give any context:
- version of Xcode
- version of Firebase
Did you import ?
import FirebaseAuth
You could try removing parenthesis around authResult, error, but that should not make a difference.
I am having the same problem and cant fix it, if anyone could help that would be great!
Has anyone found a resolution for this? This code works for Xcode 9 but does not work on Xcode 13. I have reviewed dozens of web sights with supposed fixes but none of them have resolved the issue.
Auth.auth().createUser(withEmail: email, password: password) { (user, error) in if let error = error { debugPrint("Error creating user: (error.localizedDescription)")
}
let changeRequest = user?.createProfileChangeRequest() changeRequest?.displayName = username changeRequest?.commitChanges(completion: { (error) in if let error = error { debugPrint(error.localizedDescription) } })
Having the same problem. I have imported FirebaseAuth and tried importing Firebase and FirebaseCore still no luck. I'm on the latest version of Xcode.
Hey, 1 - Reinstalled firebase framework w/ SPM 2 - Moved the file to trash and recreated the file
But in my project, I removed completionHandler in the used function.
Solved it for me.
Xcode: 14.2 iOS: 16.0> Firebase version: master/10.7.0