How to fix the error "No such module "FirebaseAuth"

Viewed 7157

I installed all the pods that I needed, but Xcode shows me an error "No such Module FirebaseAuth", I tried this I found:

  1. Shift+ Command + K to clean the workspace
  2. I reinstalled the podfile in the Terminal
  3. Command + b
  4. I am already in the workspace, not in the project file
  5. I didn't know if that helps but I reinstalled the computer.
import UIKit
import FirebaseAuth
import FirebaseDatabase
import FirebaseStorage

Here is the Pod file:

target 'Ouvrigram' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

    pod 'Firebase/Core'
  pod 'Firebase/Database'
  pod 'Firebase/Storage'
  pod 'Firebase/Auth'
  # Pods for Ouvrigram

end

I installed all the pods, I checked there are installed, I don't​ know what I am to do Pls help.

3 Answers

Are you sure the target name is the same as your Xcode project name ? Also make sure you are opening the project with the .xworkspace file. You can't use the .xcodeproj file anymore if you are using pods

XCode is really buggy and Apple isn't really excited about improving their compatibility with Google services. I get the same error even after importing:

  • import Firebase
  • import FirebaseFirestore
  • import FirebaseAuth
  • import FirebaseFirestoreSwift

But my project builds and runs successfully in spite of all the RED errors everywhere on my project. In fact, a simple "import Firebase" is enough for a successful build.

XCode Version 13.4.1 (13F100)

Related