Reputation: 7885
I wanted to implement the Firestore Database. In my Podfile I added pod 'Firebase/Firestore'
and did pod install
. When trying to use let db = Firestore.firestore()
I get the Error:Use of unresolved identifier 'Firestore'
. I have tried pod update too and it also says Using FirebaseFirestore (0.12.2)
but it soll doesn't work. What should I do?
Upvotes: 17
Views: 9461
Reputation: 479
I had to add pod 'Firebase/Firestore'
to the podfile and then reinstall the podfile.
Upvotes: 7
Reputation: 81
If my guess is right. pod 'Firebase/Firestore' was installed after appname.xcworkspace was created by already installing pod once. One solution is to remove all these ****appname.xcworkspace, ****Podfile.Lock, ****Pods Folder and install pod once more. it should work.
Upvotes: 5
Reputation: 1
This did it for me, add pod 'Firebase/Firestore' to the podfile and import FirebaseFirestore
Credit to Pseudonym Patel https://stackoverflow.com/a/53434443/12088138
Upvotes: 0
Reputation: 2529
Using var db: Firestore!
instead of var db: FireStore!
worked for me.
Upvotes: 3
Reputation: 7885
I solved the problem following this: https://stackoverflow.com/a/44486792/9547658
I don't know why it didn't worked in the first place but now it works...
Upvotes: 4
Reputation: 1195
You need to import it.
Include import FirebaseFirestore
at the top of your manager file.
Upvotes: 35