ios - Alamofire 不会使用 Cocoapods 在空的 Swift 项目中构建

标签 ios xcode cocoapods alamofire

我正在通过为 Swift 创建一个空白的单 View 应用程序来开始一个项目。使用 Cocoapods,我按如下方式添加 Alamofire:

platform :ios, "8.0"
use_frameworks!

target 'TestGauge' do
    pod 'Alamofire', '~> 3.0'
end

target 'TestGaugeTests' do

end

然后,在终端中运行 pod install

当返回到 XCode 时,项目无法构建,Alamofire 生成了 1000 多个错误。

我从工作区文件而不是项目文件运行 XCode。

XCode 版本 6.4

有没有人有过这种行为,或者谁能提供解决方案?我是否错过了关键步骤?

谢谢!

最佳答案

Alamofire 3.0 是用 Swift 2.0 编写的。 Xcode 6.4 不支持 Swift 2.0。更改 Alamofire 版本或更新您的 Xcode。

关于ios - Alamofire 不会使用 Cocoapods 在空的 Swift 项目中构建,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33879533/

相关文章:

ios - TabBarController Transitions 在 iOS 中出现黑屏问题

ios - App Store 上的应用程序相机运行速度比测试版本慢

cocoapods - Xcode 11 beta 4 构建错误 : "Command CompileSwiftSources failed with a nonzero exit code" (error: unknown argument: '-Wno-shorten-64-to-32' )

cocoapods - Pod 设置失败

objective-c - 处理隐藏的错误 Objective C

ios - 编译时不包括 Prefix.pch

ios - 如何访问ios7中的tableView单元格

ios - 实现可重用和可配置的 ViewController

ios - 缓存图像和 UICollectionView

ios - 找不到 AFHTTPClient.h 文件