作者:小阳 | 来源:互联网 | 2023-05-17 18:37
IamtryingtoupdatemySwiftprojecttoFirebasesnewSDKVersion4.0.0usingCocoaPods(assugge
I am trying to update my Swift project to Firebase's new SDK Version 4.0.0 using CocoaPods (as suggested by the documentation) but the updated SDK does not seem to be installing even when I follow the steps in the documentation.
我正在尝试使用CocoaPods(正如文档中所建议的)将我的Swift项目更新到Firebase的新SDK版本4.0.0,但是即使我按照文档中的步骤操作,似乎也没有安装更新的SDK。
Can anyone help my understand why this is not working and what I can do to update to the new Firebase SDK?
任何人都可以帮助我理解为什么这不起作用以及我可以做些什么来更新到新的Firebase SDK?
My Podfile
我的Podfile
# Uncomment this line to define a global platform for your project
platform :ios, '9.2'
# Uncomment this line if you're using Swift
use_frameworks!
target 'myProject' do
pod 'Firebase'
pod 'Firebase/Auth'
pod 'Firebase/Core'
pod 'Firebase/Storage'
pod 'Firebase/Database'
pod 'Firebase/Crash'
pod 'Firebase/Messaging'
pod 'Alamofire', '~> 4.4'
end
When I run pod install
I get this seemingly promising output (except that it is not version 4 as I think it should be):
当我运行pod安装时,我得到了这个看似很有希望的输出(除了它不是版本4,因为我认为它应该是):
Analyzing dependencies
Downloading dependencies
Using Alamofire (4.4.0)
Installing Firebase 3.17.0 (was 3.17.0)
Using FirebaseAnalytics (3.9.0)
Using FirebaseAuth (3.1.1)
Using FirebaseCore (3.6.0)
Using FirebaseCrash (1.1.6)
Using FirebaseDatabase (3.1.2)
Using FirebaseInstanceID (1.0.10)
Using FirebaseMessaging (1.2.3)
Using FirebaseStorage (1.1.0)
Using GTMSessionFetcher (1.1.9)
Using GoogleToolboxForMac (2.1.1)
Using Protobuf (3.3.0)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 8 dependencies from the Podfile and 13 total pods installed.
I can tell it isn't updating to the most recent SDK as well because the new firebase documentation does not match the functions that work in my project. My project is in Swift, so for example:
我可以告诉它也没有更新到最新的SDK,因为新的firebase文档与我项目中的函数不匹配。我的项目是在Swift中,例如:
Works
作品
FIRApp.configure()
Does not work (but is suggested by documentation)
不起作用(但是文档建议)
FirebaseApp.configure()
I did try these solutions as well:
我也尝试过这些解决方案:
- https://stackoverflow.com/a/38135857/4206520
- https://stackoverflow.com/a/38135857/4206520
- https://stackoverflow.com/a/37365721/4206520
- https://stackoverflow.com/a/37365721/4206520
4 个解决方案