如何在Xcode 10.1中添加Alamofire

OOk*_*han 3 ios cocoapods alamofire

使用CocaPods添加Alamofire后编译应用程序时,出现以下错误。

error: SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2. (in target 'Alamofire')
Run Code Online (Sandbox Code Playgroud)

Podfile: pod 'Alamofire', '~> 5.0.0-beta.5'

我正在跟踪将Alamofire添加到我的项目的链接Swift 5

Xcode Version: 10.1
Run Code Online (Sandbox Code Playgroud)

Tom*_*kis 5

Swift 5的支持XCode已添加到中version 10.2。要AlamofireSwift 5您一起使用,将需要更新您的XCode版本。其他建议是在pod设置中将您的Alamofire版本降级为4.8.2或将其更改Swift4.2


祝好运 :)