我是否需要在xcode 9中使用cocoapods明确说明我要安装哪个版本的alamofire,swift 4

时间:2017-09-28 04:44:28

标签: swift cocoapods alamofire xcode9

本教程有:alamofire https://www.raywenderlich.com/147086/alamofire-tutorial-getting-started-2

在其中安装的吊舱被宣布为' Alamofire','〜> 4.2.0'

我是否需要指定4.2.0版本,或者我可以将其声明为pod' Alamofire'?

我去了Cocoapods的Alamfoire页面,但实际上我找不到最新的稳定版本,尽管我确定它在某处。

还有这篇文章:alamofire没有使用xcode 9 / swift 4 Xcode 9 fails to build Swift 4 project with Alamofire pod,但我认为问题是这个人打开了错误的项目,而不是代码库。

但如果有人知道任何其他问题,请随时大声喊出来。

感谢。

2 个答案:

答案 0 :(得分:7)

如果您声明以下内容,您将获得最新的稳定版本:

pod 'Alamofire'

如果您声明版本号,那么您将使用该版本:

pod 'Alamofire', '~> 4.2.0'

答案 1 :(得分:0)

版本说明。

pod 'Alamofire', '~> 4.2.0'


'> 0.1' Any version higher than 0.1
'>= 0.1' Version 0.1 and any higher version
'< 0.1' Any version lower than 0.1
'<= 0.1' Version 0.1 and any lower version