繁体   English   中英

Xcode 来自 Firebase pod 的构建错误:错误:'FIRAuth' 没有可见的@interface

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

我刚刚从一个工作版本中提取出来,由于看起来像cocopods错误而无法构建我的项目

我试过的

退出 Xcode。
删除位于 ~/Library/Developer/Xcode/DerivedData 的项目临时文件
删除 ProjectName.xcworkspace
删除 Podfile.lock 文件和 Pods 文件夹
运行吊舱安装。
打开新创建的 ProjectName.xcworkspace 文件并构建。

我还使用pod update Firebase/Firestore了 Firebase/Firestore pod
cloud_firestore 在 IOS 模拟器上给出错误

  • 我还尝试使用pod 'Firebase/Core', '~>5.20.2'手动更新 Firebase pod 版本
    然后pod install这个在 pod install 的时候崩溃了。

  • 我也刚刚尝试了pod update这没有解决任何问题。

  • 我还通过 Xcode 构建文件夹清理并在更新 pod 后重建项目,但仍然收到相同的错误。

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

错误:

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

  • 进入文件夹资源管理器,从项目中删除 Pods 文件夹
  • 在 Xcode 中清除项目
  • 吊舱解体
  • 豆荚初始化
  • pod 缓存清理 --all
  • 豆荚更新

我用sudo gem install cocoapods更新了sudo gem install cocoapods ,然后我更新了项目pod update ,一切又正常了。 似乎某些 firebase pod 与旧版本的 cocoapods 不兼容,而且您没有获得最新版本。

如果您使用 pod 'FirebaseFirestoreSwift' 作为 cocoapod,我不得不换成使用: pod 'FirebaseFirestoreSwift', '= 7.5.0-beta'代替。 这样做,然后只做一个pod update ,看看它是否有帮助。 在这里找到答案: https://github.com/firebase/FirebaseUI-iOS/issues/938

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM