当我尝试向 Firebase 验证用户时,没问题,但是当我尝试写入数据库用户的电子邮件地址时,出现错误。
我的代码:
import UIKit
import Firebase
class ViewController: UIViewController {
@IBOutlet weak var emailField: UITextField!
@IBOutlet weak var sifreField: UITextField!
@IBOutlet weak var sifre1Field: UITextField!
var ref = Database.database().reference()
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
@IBAction func kayitBtn(_ sender: Any)
{
if(sifreField.text != sifre1Field.text)
{
print("****error****")
}
else if ( …Run Code Online (Sandbox Code Playgroud)