Alamofire无法正常工作(Swift / Xcode 8) [英] Alamofire not working (Swift/Xcode 8)

查看:175
本文介绍了Alamofire无法正常工作(Swift / Xcode 8)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在尝试将Alamofire导入我的项目时遇到以下错误(Cocoapods不能为我工作,所以我必须手动导入它。)

I am getting the following errors when trying to import Alamofire into my project (Cocoapods isn't working for me, so I have to manually import it).

无论如何,我正在使用XCode 8和Swift 2.3,我遇到了这些错误:

Anyway, I'm using XCode 8 and Swift 2.3, and I'm getting these errors:

更新:我清理了XCode,下载了最新版本的Alamofire并重新启动了我的电脑。现在,XCode似乎给了我相互矛盾的错误(图片供参考)


谢谢!

Update: I cleaned XCode, downloaded the latest version of Alamofire and restarted my computer. Now, XCode seems to be giving me conflicting errors (pictures for reference) Thanks!

推荐答案

从16年9月初开始,您需要在Podfile中使用以下内容:

As of early September '16, you need to use the following in your Podfile:

pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :tag => '3.5.0'

指向swift2.3分支不再有效,因为该分支已经删除。标签3.5.0指向支持Swift 2.3的master的最后一个版本。

Pointing to the swift2.3 branch no longer works, as that branch has been deleted. The tag '3.5.0' points to the last revision on master that supports Swift 2.3.

这篇关于Alamofire无法正常工作(Swift / Xcode 8)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆