【问题标题】:Upgraded to Xcode 6.3.1 and now Alamofire has several compiler errors, and there are compiler errors not associated with a file升级到 Xcode 6.3.1 现在 Alamofire 有几个编译器错误,并且存在与文件无关的编译器错误
【发布时间】:2026-01-25 06:25:02
【问题描述】:

以下是 Alamofire 的问题

编译器错误:

警告:

以下是应用程序其余部分的错误:

这是我尝试过的:

我更新了我的 podfile 和 pod。我有另一个名为 SwiftyJson 的库,它有 14 个编译器错误,然后我更新了 pod 并修复了它。但是 Alamofire 仍然存在问题。我看到它已经针对 swift 1.2 和 Xcode 6.3 进行了更新,但是它似乎没有工作。我还去了 Edit->Convert->To Latest Swift Syntax,但这并没有帮助。

这是 pod 文件:

如何解决这些错误?

【问题讨论】:

  • 我能够通过从应用程序中删除所有可可豆荚然后运行 ​​pod setup、pod install 来修复一般的应用程序错误。但是 Alamofire 错误仍然存​​在。

标签: ios swift linker-errors alamofire xcode6.3


【解决方案1】:

这就是解决问题的方法:

我删除了pod 'Alamofire', '~> 1.2'(在我发布问题之后,但在我尝试之前,我将 Alamofire podfile 行从pod 'Alamofire', '>= 1.2' 更改为pod 'Alamofire', '~> 1.2',这并没有解决问题,但我保留了它,因为那是Alamofire Github 页面)从 podfile 更改,然后我在终端中运行 pod update。然后我回到 podfile 并添加了 pod 'Alamofire', '~> 1.2' 然后我运行 pod update 突然一切正常。

【讨论】: