I am creating a fast ios 4 application and want to use Firestore to store all my data. I went through the initial tutorials and looked at the online tutorial, but I keep getting the error:
"4.8.1 - [Firebase / Firestore] [I-FST000001] Failed to reach the Firestore backend."
my cocoapods file contains:
pod 'Firebase/Core' pod 'Firebase/Auth' pod 'Firebase/Firestore'
In AppDelegate : I import Firebase and in didFinishLaunchingWithOptions I do FirebaseApp.configure()
In viewController: import Firebase (also tried import FirebaseFirestore )
I define:
var docRef : DocumentReference!
and in viewDidLoad:
docRef = Firestore.firestore().document("test/test") docRef.getDocument { (docSnapshot, error) in guard let docSnapshot = docSnapshot, docSnapshot.exists else {return} let myData = docSnapshot.data() let val = myData!["name"] as? integer_t ?? 1 print(val) }
and I get an error
"4.8.1 - [Firebase / Firestore] [I-FST000001] Failed to reach the Firestore backend."
I have a firestore set to test mode, so all reads and writes must be allowed. Any of the ideas on why I cannot connect to the server?
source share