Pod安装继续使用错误的版本安装Alamofire

时间:2017-04-09 18:35:54

标签: swift3 cocoapods alamofire

Podfile:

platform :ios, '10.0'
use_frameworks!
target 'Netsil' do
  # Pods for Netsil

  # Upload
  pod 'SwiftyJSON', :git => 'https://github.com/acegreen/SwiftyJSON.git', :branch => 'swift3'
  pod 'Alamofire', '~> 4.0'

  # Login
  pod 'FacebookCore'
  pod 'FacebookLogin'
  pod 'FacebookShare'

  pod 'FBSDKCoreKit'
  pod 'FBSDKShareKit'
  pod 'FBSDKLoginKit'

  pod 'GoogleSignIn'
  pod 'Firebase/Auth'

  pod 'Fabric'
  pod 'TwitterKit'

end

我一直在:

pod install
Analyzing dependencies
Downloading dependencies
Using Alamofire (4.2.0)
Using Bolts (1.8.4)
Using FBSDKCoreKit (4.18.0)
Using FBSDKLoginKit (4.18.0)

我想4.0不是4.2 ......

1 个答案:

答案 0 :(得分:3)

Change the following line from:

pod 'Alamofire', '~> 4.0'

to:

pod 'Alamofire', '<= 4.0'

And you'll get Alamofire 4.0 :) I believe with the line you currently have, you will get anything from 4.0 up to 5.0 but not including 5.0 or higher ...