Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firestore: Use of unresolved identifier 'Firestore'

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?

like image 768
Jonas Avatar asked Jun 05 '18 17:06

Jonas


4 Answers

You need to import it.

Include import FirebaseFirestore at the top of your manager file.

like image 146
Jake G Avatar answered Nov 15 '22 14:11

Jake G


I had to add pod 'Firebase/Firestore' to the podfile and then reinstall the podfile.

like image 7
Pseudonym Patel Avatar answered Nov 15 '22 13:11

Pseudonym Patel


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.

like image 5
Neeraj Jerauld Avatar answered Nov 15 '22 14:11

Neeraj Jerauld


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

like image 4
Jonas Avatar answered Nov 15 '22 15:11

Jonas