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?

- 7,089
- 15
- 49
- 110
7 Answers
You need to import it.
Include import FirebaseFirestore
at the top of your manager file.

- 1,185
- 9
- 19
-
1I get `No such module 'FirebaseFirestore'` there as well. Before I had `import Firebase` and this works. But somehow Firestore does not. Also I find it suspicious that it in my terminal it says `Using FirebaseFirestore (0.12.2)` while the other Firebase imports are 5.0.x. – Jonas Jun 05 '18 at 19:33
-
2I find it strange that Google couldn't tell us this. https://firebase.google.com/docs/firestore/quickstart – Jeff Aug 12 '18 at 17:25
I had to add pod 'Firebase/Firestore'
to the podfile and then reinstall the podfile.

- 469
- 7
- 16
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.

- 71
- 1
- 3
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...

- 7,089
- 15
- 49
- 110
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

- 1
- 1