I am getting this error for import Firebase
:
Could not build Objective-C module 'Firebase'
Xcode also complains about FirebaseAnalytics saying
'FirebaseAnalytics/FirebaseAnalytics.h' file not found.
My project used to build just fine until I updated to swift 4.
I am using the latest version of Firebase via Cocoapods version 1.4.0 beta 2.
I just had the same issue. What I had to do was:
.xcworkspace
project file.After that I had no more Firebase error messages.
In Xcode, Go to
Product
->Scheme
-> SelectNew Scheme
. Then chooseFirebaseCore
as Target and Name. Now build the project and then change back to your app target. It works for me in Xcode 9.1After updating to XCode 9.4 the problem resolved itself.
Link Binary with Libraries
Build Phases - under Link Binary With Libraries - this is where the magic happens:
It is very likely, your binary is not linked with the
Firebase
library - hence the header file cannot be found.