The problem: When I tried to compile and build an app in Xcode, I received this error “Could not build Objective-C module ‘Firebase’
Is there a solution? Yes!
This error occurs when clicking “Import Firebase” for the ViewController.swift file.
- Quit your Xcode program.
- Go to ~/Library/Developer/Xcode/DerivedData.
- Delete .xcworkspace.
- Delete Podfile.lock file and Pods folder.
- Run pod install.
- You should have a new project name in .xcworkspace. Open the file and build.
Credit to Faycel_TUN_2020 for reporting this problem and also sharing the solution.