Error: Could not build Objective-C module 'Firebase'
When I compile the application I get an error equal to this:
Could not build Objective-C module 'Firebase'
This error appear in import Firebase
of my file swift.
Solution 1:
There is only one way to solve this issue.
- Quit Xcode.
- Delete project's temp files located at
~/Library/Developer/Xcode/DerivedData
- Delete
ProjectName.xcworkspace
- Delete
Podfile.lock
file andPods
folder - Run
pod install
. - Open the newly created
ProjectName.xcworkspace
file and build.
Solution 2:
Build (⌘ + B) worked for me.
Solution 3:
I am using Swift 4 and Xcode 9. All I have to do is selecting FirebaseCore Scheme.
On Xcode:
Product->Scheme->FirebaseCore.
If you don't have FirebaseCore go to Manage Schemes
and select it. Then try again.
Solution 4:
This may fix your problem:
Quit the Xcode. (Don't just close the Xcode window, right click and Quit it explicitly).
Go to
~/Library/Developer/Xcode/DerivedData
and delete the project folder. (Simply delete all the folders).Clean and Build the project.
If still error exist:
Do steps 1 and 2 and follow this steps:
Change scheme to Firebase and Build (Command + B).
Change back to your app scheme and Run again.