Snippets Collections
@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"])
        }
    }
star

Mon Jan 10 2022 06:37:19 GMT+0000 (UTC)

#ios #swift #update #updatedata #data

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension