Alamofire无法正常工作(Swift / Xcode 8)

编程入门 行业动态 更新时间:2024-10-21 23:02:49
本文介绍了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 => 'github/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)

本文发布于:2023-11-26 02:57:04,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1632359.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:无法正常   工作   Alamofire   Swift   Xcode

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!