我最近刚刚更新了自己的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
,但我不知道这是否会引起问题。有人知道我在做错什么,或者如何使它们正常工作吗?
答案 0 :(得分:2)
我终于做到了。我认为我的实际问题是,在React.js
之后,FirebaseUI从5.2.2更新到6.2.1。由于某些原因,cocoapods认为FirebaseUI 6.2.1与FirebaseAuth 5.2.0兼容。这些不兼容。如果您尝试同时使用这两个库,则会收到上述错误。因此,我删除了podfile.lock,并再次运行pod repo update
以清除所有内容。然后,我将pod deintegrate
添加到了我的Podfile中,运行了pod FirebaseUI, '5.2.2'
,就可以了!
我还将可可足类从1.5.3更新为1.6.1,这可能也有所帮助。