Reputation: 57
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.
Upvotes: 2
Views: 16795
Reputation: 169
I just had the same issue. What I had to do was:
.xcworkspace
project file.After that I had no more Firebase error messages.
Upvotes: 16
Reputation: 9764
In Xcode,
Go to Product
-> Scheme
-> Select New Scheme
. Then choose FirebaseCore
as Target and Name. Now build the project and then change back to your app target. It works for me in Xcode 9.1
Upvotes: 4
Reputation: 31959
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.
Upvotes: 1