最近升级到Xcode 8.1尝试安装新项目的Alamofire Pod。Podfile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
target 'app' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for app
pod 'Alamofire',
:git => 'https://github.com/Alamofire/Alamofire.git',
:branch => 'swift3'
end
我的航站楼回应:图像
那我该怎么办?
- 更新 - 也尝试了pod 'Alamofire', '~> 4.0'
这是结果
我做了 pod repo update
,它根本没有做任何事情
按如下图编辑podfile,只需使用pod install --verbose
命令安装PODS(如果仍然存在错误),然后使用pod repo update
更新回购,然后再试一次。
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
target 'app' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for app
pod 'Alamofire'
end
根据这里的讨论,
您需要使用
pod 'Alamofire', '~> 4.0'
在您的POD文件中
我在将Mac OS从El Capitan更新为Sierra并安装了新版本的Xcode时遇到了同样的问题。
我更新了Cocoapod,但仍面临着同样的问题。
我通过从根目录中完全删除可可录并再次安装解决方案。
要完全删除Cocoapod,在终端中使用它
$ sudo rm -fr ~/Library/Caches/CocoaPods/
$ sudo rm -fr ~/.cocoapods/repos/master/
然后再次安装Cocoapod
$ gem install cocoapods