Xcode build error from Firebase pod: error: no visible @interface for 'FIRAuth'

Viewed 888

I just pulled from a working version and cannot build my project due to what looks like a cocopods error

What I've Tried

Quit Xcode.
Delete project's temp files located at ~/Library/Developer/Xcode/DerivedData
Delete ProjectName.xcworkspace
Delete Podfile.lock file and Pods folder
Run pod install.
Open the newly created ProjectName.xcworkspace file and build.

I also udpated jsut the Firebase/Firestore pods with pod update Firebase/Firestore
cloud_firestore giving errors on IOS Simulator

  • I also tried manually updating the Firebase pod version with pod 'Firebase/Core', '~>5.20.2'
    Then pod install This crashed during pod install.

  • I also just tried pod update this did not resolve anything.

  • I also cleaned by Xcode build folder and rebuild the project after updating the pods and still received the same error.

- (void)useEmulatorWithHost:(NSString *)host port:(NSInteger)port {
  [self.auth useEmulatorWithHost:host port:port];
  self.emulatorEnabled = YES;
}

Error:

error: no visible @interface for 'FIRAuth' declares the selector 'useEmulatorWithHost:port:'
  [self.auth useEmulatorWithHost:host port:port];
   ~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

3 Answers
  • Delete Pods folder from Project by going into Folder explorer
  • Clear Project in Xcode
  • pod deintegrate
  • pod init
  • pod cache clean --all
  • pod update

I updated cocoapods with sudo gem install cocoapods and then I updated the project pod update and everything works again. It seems some firebase pods are not compatible with old version of cocoapods and you are not getting the last version.

If you're using pod 'FirebaseFirestoreSwift' as a cocoapod, I had to swap over to using: pod 'FirebaseFirestoreSwift', '= 7.5.0-beta' instead. Do that and then just do a pod update and see if it helps. Answer found here: https://github.com/firebase/FirebaseUI-iOS/issues/938

Related