Rba*_*bar 19 sdk ios cocoapods firebase swift
我正在尝试使用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
Run Code Online (Sandbox Code Playgroud)
当我运行时,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.
Run Code Online (Sandbox Code Playgroud)
我可以告诉它也没有更新到最新的SDK,因为新的firebase文档与我项目中的函数不匹配.我的项目是在Swift中,例如:
作品
FIRApp.configure()
Run Code Online (Sandbox Code Playgroud)
不起作用(但是文档建议)
FirebaseApp.configure()
Run Code Online (Sandbox Code Playgroud)
我也尝试过这些解决方案:
Pau*_*tos 32
有没有错,你原来的Podfile;)你只是混淆pod install使用pod update-你正在运行前,但你应该用后者代替.清理简要概述:
pod安装.当您运行时pod install,它只解析尚未列在其中的pod的依赖项Podfile.lock.对于pods Podfile.lock,它下载那里列出的显式版本,而不检查是否有更新的版本 - 我相信这种(预期的)行为导致了你的问题.
pod更新.如果您运行pod update,CocoaPods会将您列出的每个pod更新Podfile为最新版本.当然,尊重您声明的版本限制Podfile,如果有的话.
有关详细信息,请务必查看pod install与pod更新指南.
Jac*_*sox 19
我有一个类似的问题,甚至在运行后,被困在下面的输出run pod repo remove master与pod install和pod update:
Using AmazonAd (2.2.15)
Using Firebase (3.17.0)
Using FirebaseAnalytics (3.9.0)
Using FirebaseCore (3.6.0)
Using FirebaseInstanceID (1.0.10)
Using Google (3.1.0)
Using Google-Mobile-Ads-SDK (7.19.1)
Using GoogleToolboxForMac (2.1.1)
Run Code Online (Sandbox Code Playgroud)
我一直看到pod update命令输出中的注释:
[!] Google has been deprecated
Run Code Online (Sandbox Code Playgroud)
所以我从podfile中删除了Google:
pod Google
Run Code Online (Sandbox Code Playgroud)
然后我重新跑了:
pod update
Run Code Online (Sandbox Code Playgroud)
并收到:
Using AmazonAd (2.2.15)
Installing Firebase 4.3.0 (was 3.17.0)
Installing FirebaseAnalytics 4.0.4 (was 3.9.0)
Installing FirebaseCore 4.0.8 (was 3.6.0)
Installing FirebaseInstanceID 2.0.4 (was 1.0.10)
Installing Google-Mobile-Ads-SDK 7.24.1 (was 7.19.1)
Using GoogleToolboxForMac (2.1.1)
Installing nanopb (0.3.8)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
13975 次 |
| 最近记录: |