我正在通过为 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/