CocoaPods未将Firebase SDK更新到版本4.0.0

问题描述

有没有错,你原来的Podfile;)你只是混淆pod install使用pod update-你正在运行前,但你应该用后者代替。简要概述以清除问题:

。当您运行时pod install,它 仅_解决尚未在中列出的Pod的依赖关系Podfile.lock。对于中的PodPodfile.lock,它会下载此处列出的 _显式版本 ,而无需检查是否有较新的版本-我认为这种(预期的)行为是造成您的问题的原因。

。如果您运行podupdate,CocoaPods会将您列出的每个Pod更新Podfile为可能的最新版本。当然,请遵守您中声明的版本限制Podfile(如果有)。

有关更多信息,请确保同时查看Pod安装与Pod更新指南。

解决方法

我正在尝试使用CocoaPods将Swift项目更新为Firebase的新SDK版本4.0.0如文档所建议),但是即使按照文档中步骤进行操作,更新的SDK似乎也没有安装。

谁能帮助我了解为什么这不起作用以及我如何才能更新到新的Firebase SDK?

我的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

当我运行时,pod install我得到了看似有希望的输出(除了它不是 我认为 应该的版本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.

我可以说它也不会更新到最新的SDK,因为新的firebase文档与我的项目中使用的功能不匹配。我的项目在Swift中,例如:

作品

FIRApp.configure()

不起作用( 但由文档建议

FirebaseApp.configure()

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...