我已经关注了 installation instructions但是在 Xcode 9.2 中打开项目的 xcworkspace 时出现以下错误
The target “Alamofire” contains source code developed with Swift 2.x. Xcode 9 does not support building or migrating Swift 2.x targets. Use Xcode 8.x to migrate the code to Swift 3.
不确定我是否有旧版本的 Alamofire:我的 Podfile 包含
source 'https://github.com/CocoaPods/Specs.git' platform :ios, '9.0' use_frameworks! target 'raceQs' do pod 'Alamofire', '~> 4.5' pod 'DLAlertView' pod 'CocoaAsyncSocket' pod 'GoogleAnalytics-iOS-SDK' pod 'SWRevealViewController' pod 'SSKeychain' pod 'SSZipArchive' pod 'mailcore2-ios' pod 'CrashlyticsFramework' end
pod 安装报告
Installing Alamofire (4.6.0)
最佳答案
不要通过 Alamofire 版本。对您的 Podfile 进行以下更改。
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
target 'raceQs' do
pod 'Alamofire'
//rest of your pods
end
关于swift - 在 Xcode 9 Swift 3 Watch 应用程序中安装 Alamofire,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48331778/