import Firebase
Firestore.firestore()
.collection("Collection name")
.document(Document ID)
.setData([
"Value": 1,
"UserId" : Auth.auth().currentUser!.uid
], merge: true)
The point is merge: true. Don't forget to import Firebase
Recommended Posts