所以我一直在尝试设置默认登录系统(同时我创建应用程序的其余部分),所以现在我只希望我的应用程序使用我的凭据进行身份验证(只有 1 个用户,在开发中),但我无法访问 Firebase API 的方法说要用。
当我尝试调用该方法时,这就是自动完成的内容
基本上就是找这样的方法
Auth.auth().signIn(withEmail: email, password: password) { (user, error) in
// code
}
最佳答案
确保您同时导入:
import Firebase import FirebaseAuth
对于登录,调用此函数并在完成处理程序中执行您的任务:
FIRAuth.auth()?.signIn(withEmail: username, password: pass, completion: { (user, error) in })
对于注册,执行此操作:
FIRAuth.auth()?.createUser(withEmail: "\(username)", password: "\(pass)", completion: { (user,error) in })
关于ios - Firebase:Auth.signInWithEmailAndPassword 不存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48534478/