Quân Hoàng
Quân Hoàng

Reputation: 411

Can not install FBSDKCoreKit old version after run `pod repo update`

I have a swift 3 project. I try to upgrade to swift 4.2 and it's required me to run pod repo update when I run pod install. I did it and pod install worked

But the are some trouble then I have back to swift 3. Now I run pod install it's install new version of FBSDKCoreKit

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

That is not compatible with my swift 3 project. I want to FBSDKCoreKit (4.40.0) or older.

I have changed Podfile to

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'

And got this error:

[!] 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.

It's seem the gem's source is changed.

Please help me. Thanks

Upvotes: 1

Views: 2008

Answers (2)

Quân Hoàng
Quân Hoàng

Reputation: 411

Finally, I found the solution and correct version on github. Special thank to @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'

Upvotes: 0

valosip
valosip

Reputation: 3402

First glance it looks like you have your pod names mixed up. Take a look at the release log for FacebookCore = https://github.com/facebook/facebook-swift-sdk/releases

The highest version here is 0.8, and it can't find your set version of 4.40.0

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

While the latest version here is 5.4.1

Looks like you also have a missing comma on the second pod

pod 'FacebookLogin' '4.40.0'

Upvotes: 1

Related Questions