FIRAuth文件与FirebaseUI不兼容:使用未声明的标识符'FIRAuthErrorUserInfoUpdatedCredentialKey'

问题描述 投票:1回答:1

我刚刚更新了我的podfile并添加了两个条目pod 'Firebase/Storage'pod 'FirebaseUI/Storage'。当我添加这两个条目时,当我在Xcode中打开我的项目时,构建失败,我收到以下错误:

Use of undeclared identifier 'FIRAuthErrorUserInfoUpdatedCredentialKey'; did you mean 'FIRAuthUpdatedCredentialKey'?
Replace 'FIRAuthErrorUserInfoUpdatedCredentialKey' with 'FIRAuthUpdatedCredentialKey'

在FUIAuth.m中可以找到此错误。看看FirebaseAuth的GitHub项目,我看到FIRAuthErrorUserInfoUpdatedCredentialKey应该在FIRAuthErrors.h文件(https://github.com/firebase/firebase-ios-sdk/blob/master/Firebase/Auth/Source/Public/FIRAuthErrors.h)中定义,但我目前的文件与GitHub项目中的文件不同。我不确定如何设置我的podfile以正确地使这些pod一起工作。这是我的podfile的内容:

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'AppName' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for ChurchSearch
  pod 'Firebase/Core'
  pod 'Firebase/Firestore'
  pod 'Firebase/Auth'
  pod 'Firebase/Storage'
  pod 'FirebaseUI/Storage'
  pod 'FirebaseUI/Auth'

  pod 'FirebaseUI/Google'
  pod 'FirebaseUI/Facebook'
  pod 'FirebaseUI/Twitter'

  pod ‘Geofirestore'

  target 'AppNameTests' do
    inherit! :search_paths
    # Pods for testing
  end

end

那么这就是我在终端上得到的:

Analyzing dependencies
Downloading dependencies
Using Bolts (1.9.0)
Using BoringSSL-GRPC (0.0.3)
Using FBSDKCoreKit (4.44.1)
Using FBSDKLoginKit (4.44.1)
Using Firebase (5.4.1)
Using FirebaseAnalytics (5.0.1)
Using FirebaseAuth (5.0.2)
Using FirebaseCore (5.0.6)
Using FirebaseDatabase (5.0.2)
Using FirebaseFirestore (0.12.6)
Using FirebaseInstanceID (3.1.1)
Using FirebaseStorage (3.0.0)
Using FirebaseUI (6.2.1)
Using GTMSessionFetcher (1.2.1)
Using GeoFire (3.0.0)
Using Geofirestore (0.1.0)
Using GoogleSignIn (4.4.0)
Using GoogleToolboxForMac (2.2.0)
Using GoogleUtilities (5.8.0)
Using Protobuf (3.7.0)
Using TwitterCore (3.2.0)
Using TwitterKit (3.4.2)
Using gRPC (1.20.0)
Using gRPC-Core (1.20.0)
Using gRPC-ProtoRPC (1.20.0)
Using gRPC-RxLibrary (1.20.0)
Using leveldb-library (1.20)
Using nanopb (0.3.901)
Generating Pods project
Integrating client project
Sending stats

我也尝试过清洁和移除吊舱并重新安装,但这并没有改变任何东西。我确实在某一点上运行了pod repo update,我不知道这是否会引起问题。有谁知道我做错了什么,或者我怎么能让这些工作正常?

swift firebase firebase-authentication cocoapods firebaseui
1个回答
2
投票

我终于搞定了这个。我认为我的实际问题是,在pod repo update之后,FirebaseUI从5.2.2更新到6.2.1。出于某种原因,cocoapods认为FirebaseUI 6.2.1与FirebaseAuth 5.2.0兼容。这些不兼容。如果您尝试将这两个库一起使用,则会出现上述错误。所以我删除了我的podfile.lock,并再次运行pod deintegrate来清除所有内容。然后我将pod FirebaseUI, '5.2.2'添加到我的podfile,运行pod install,它工作了!

我还将我的cocoapods从1.5.3更新到1.6.1,这也可能有所帮助。

© www.soinside.com 2019 - 2024. All rights reserved.