Closed
Description
[READ] Step 1: Are you in the right place?
Yes
[REQUIRED] Step 2: Describe your environment
- Xcode version: 10.1
- Firebase SDK version: 5.14.0
- Firebase Component: Firestore
- Component version: 5.14.0
[REQUIRED] Step 3: Describe the problem
Setting data to firestore using the setData method does not execute closure. Reading from the database works but cannot add new data to the database. I have followed the installation instructions for carthage step by step. The only discrepancy is that the when copying the bundle resources for firestore I copied the gRPCCertificates-Firestore.bundle file from the /Carthage/Build/iOS/FirebaseFirestore.framework/ folder but the readme says to copy gRPCCertificates.bundle(which was not in that folder). I've tried both on a simulator and a real device and have tried different network connections. Database rules allow writes
Steps to reproduce:
Relevant Code:
//This code works and the completion handler gets called
Firestore.firestore().collection("Ticket").getDocuments { (querysnapshot, error) in
for document in querysnapshot!.documents {
print(document.data())
}
}
///This code does not work, completion handler never gets called
Firestore.firestore().collection("Ticket").document().setData(["myData":` "data"]) { (error) in
if error != nil {
print(error!.localizedDescription)
} else {
print("data was written")
}
}