运行`pod repo update`后无法安装旧版本的FBSDKCoreKit

时间:2019-08-28 02:39:10

标签: swift cocoa

我有一个迅速的3项目。我尝试升级到Swift 4.2,运行pod repo update时需要运行pod install。我做到了,pod install工作了

但是有些麻烦,然后我又回到了快速3。 现在,我运行pod install,它会安装新版本的FBSDKCoreKit

Installing FBSDKCoreKit (5.4.1)
Installing FBSDKLoginKit (5.4.1)
Installing FBSDKShareKit (5.4.1)

那与我的swift 3项目不兼容。 我想FBSDKCoreKit (4.40.0)或更老。

我已将Podfile更改为

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

  # Pods for EPARK
pod 'FacebookCore', '4.40.0'
pod 'FacebookLogin' '4.40.0'
pod 'FacebookShare'
pod 'ReachabilitySwift'

并收到此错误:

[!] Unable to satisfy the following requirements:

- `FacebookCore (= 4.40.0)` required by `Podfile`

None of your spec sources contain a spec satisfying the dependency: `FacebookCore (= 4.40.0)`.

You have either:
 * out-of-date source repos which you can update with `pod repo update`.
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

宝石的来源似乎已改变。

请帮助我。 谢谢

2 个答案:

答案 0 :(得分:0)

乍看之下,您似乎将自己的广告连播名称混在一起。 看一下发布日志 FacebookCore = https://github.com/facebook/facebook-swift-sdk/releases

此处的最高版本是0.8,找不到您设置的版本4.40.0

FBSDKCoreKit = https://github.com/facebook/facebook-objc-sdk/releases

此处的最新版本是5.4.1

看起来您在第二个广告连词中也缺少逗号

pod 'FacebookLogin' '4.40.0'

答案 1 :(得分:0)

最后,我在github上找到了解决方案和正确的版本。 特别感谢@valosip

+ pod 'FacebookCore', :git => 'https://github.com/facebook/facebook-sdk-swift.git', :tag => '0.4.0'
+  pod 'FacebookLogin', :git => 'https://github.com/facebook/facebook-sdk-swift.git', :tag => '0.4.0'
+  pod 'FacebookShare', :git => 'https://github.com/facebook/facebook-sdk-swift.git', :tag => '0.4.0'
相关问题