Make sure that your pod definition looks like this:
# Pods for CustomLoginDemo
pod 'Firebase/Analytics'
pod 'Firebase/Auth'
pod 'Firebase/Core'
pod 'Firebase/Firestore'
pod 'FirebaseFirestoreSwift'
Close the project in Xcode then…
In terminal use the command: pod update
which ensures that the local pod definitions are updated and then adds the appropriate pods to the project.
When you open your project, make sure that you open it via YourProjectName.xcworkspace rather than YouProjectName.xcodeproj
I am facing the same error actually and I tried updating the pod and everything but it still gives me the same error. Any suggestions would be appreciated.
Hey Abdalla, even if your error message is the same as Dod_Mav’s error message, the cause of your’s might be different. Have you tried Chris Parker’s suggestions above? If you have, then also double check that at the top of your file, you have a “import Firestore”.
Have you added the cocoapods for this project? Refer to chris parker for the list of pods to add…
If you are not familiar with cocoapods check this article https://codewithchris.com/cocoapods/
Thank you for the quick response. “I had import Firebase” at the top but then I added “import FirebaseFirestore” and that worked. Didn’t know there was a difference.
Hi Chris,
Thanks for your solution, worked like a charm! For other people with the same issue open your Podfile add Chris text, save the file, and follow Chris explanation.
Yup, same problem here. I used package manager to add the dependancies and had the import statement at the top and still no luck! I have put it all over the file and it always says “Firestore not in scope” Screen Shot 2022-06-12 at 1.26.53 AM|690x431