安装 pod Alamofire 时出现错误

Getting and error when install pod Alamofire

我一直在尝试使用 CocoaPods 方法将 pod Alamofire 安装到我的项目中 安装成功,但是当我开始构建项目时出现此错误。安装后我什么也没做。

我该如何解决这个问题?

播客文件

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

pod 'Facebook-iOS-SDK'

pod "TSClusterMapView"

pod "MagicalRecord"

pod 'Follower'

pod 'Alamofire', '~> 3.0'

如果您没有这样做,可以先尝试 产品> 清洁。如果你遇到一些问题 确保你的 Cocoapods 是最新的。 另外在 pod install target <> do 之前检查你的 podfile,如下所示。

source 'https://github.com/CocoaPods/Specs'
use_frameworks!

target '<ProjectName>' do
pod 'Alamofire', '~> 3.0'
pod 'AlamofireImage', '~> 2.0'
pod 'Firebase', '>= 2.5.1'
end

我遇到了这个错误,你应该有 Swift 2.2 来安装 pod。

xcrun swift -version 检查你的版本,如果它是 < 2.2,你应该下载 Xcode 7.3,这将解决问题。