Update Data

PHOTO EMBED

Mon Jan 10 2022 06:37:19 GMT+0000 (Coordinated Universal Time)

Saved by @hasnat #ios #swift #update #updatedata #data

@IBAction func saveChangesPressed(_ sender: UIButton) {
        
        let user = Auth.auth().currentUser
        if let user = user {
            let db = Firestore.firestore()
            let docRef = db.collection("Users").document(user.uid)
            docRef.updateData(["Name": self.nameField.text ?? "User","Email": self.emailField.text ?? "a@gmail.com", "MobileNumber": self.phoneNumberField.text ?? "123"])
        }
    }
content_copyCOPY