Hello!
I Found an error in my Xcode project where it says: no such module ‘Firebase’ .
I watched the video with Micah and write about the same code, then I went online and saw some fixes to fix it but non of them helped!
Here’s what I tried :
Command + B,
Deleting and reinstalling the pod,
Quitting Xcode and re-launching it and some other techniques online.
This is what my Pod file looks like:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'FireBaseDemo' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for FireBaseDemo
pod 'Firebase/Storage'
pod 'Firebase/Firestore'
pod 'FirebaseFirestore'
end
You’re opening the .xcworkspace file?
Yes, It gives my the error when I open the .xcworkspace file.
Is your cocoapods up to date? Like the actual package manager itself, not the pods (packages)
when I do in the terminal pod --version it gives me 1.10.1 and when I do pod update and check he version again its still 1.10.1
I just checked and I have the latest cocoapods version
Where are you importing Firebase where you’re getting this error?
That is the error it shows for me
Oh, Sorry I found the issue, the problem was that the podfile was incorrect and I just changed it and now It works.
@arielcoder
Hi Ronen,
I have to say that what you are experiencing is a bit odd and I say that because I have done that tutorial too and it works fine for me. My Podfile looks like this:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'FirebaseDemo' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for FirebaseDemo
pod 'Firebase/Firestore'
end
As you can see there is only one pod definition and that’s all that Micah used in his tutorial as well so I think you should be sticking to that approach.
I just checked my project and did a fresh build after a pod update just to see what changes have been made to pods since I last used the project. When the pod update completed I opened the project, cleaned it (Shift + Command + K) and waited for it to re-index the files then performed a build. There were a bunch of warnings about iOS deployment targets and some other obscure warnings.
Edited the Podfile and uncommented the platform directive to be platform :ios '14.0'
then performed a pod update. Re-opened the project in Xcode and performed a build. Xcode recommended performing a series of updates to the build target settings for some of the Firebase frameworks which I did and then performed another Build. The remaining warnings are having no material affect on the project and the last query I had defined ran fine.
Other than the comments above I have no insight into why your version of the project is not playing the game.
(EDIT).
OK I see you have now solved it. Good news.