无法找到`podName`的规范

时间:2016-09-15 07:58:11

标签: ios swift3 xcode8 cocoapods-1.0.1

我无法为我的Podfile中列出的任何pod找到podSpec。我的Podfile如下所示:

use_frameworks!

target 'MyTargetName' do
    pod 'Gloss'
    pod 'IQKeyboardManagerSwift'
    pod 'ICViewPager'
    pod 'SkyFloatingLabelTextField'
    pod "KCFloatingActionButton"
    pod "TSMessages"
end

最初我收到了一个错误:

[!] Unable to find a specification for `IQKeyboardManagerSwift`

我尝试删除IQKeyboardManagerSwift,但后来又出现了另一个错误:

[!] Unable to find a specification for `ICViewPager`

我已经检查了这两个项目,它们存在于cocoapods.org上,而podspec存在于github以及pod repo上。 当我更新到Xcode 8.0和Swift 3.0时,一切都开始了。知道这里出了什么问题吗?

编辑:

我设法找到了解决与下载cocoapods相关的问题的解决方法:

use_frameworks!

target 'MyTargetName' do
    pod 'Gloss'
    pod 'IQKeyboardManagerSwift', :git => 'https://github.com/hackiftekhar/IQKeyboardManager'
    pod 'ICViewPager', :git => 'https://github.com/iltercengiz/ICViewPager'
    pod 'SkyFloatingLabelTextField’, :git => 'https://github.com/Skyscanner/SkyFloatingLabelTextField'
    pod "KCFloatingActionButton”, :git => 'https://github.com/kciter/KCFloatingActionButton'
    pod "TSMessages”, :git => 'https://github.com/KrauseFx/TSMessages'
end

2 个答案:

答案 0 :(得分:0)

您的来源位于Podfile的顶部吗?

source 'https://github.com/CocoaPods/Specs.git'

答案 1 :(得分:-1)

执行以下操作:

$ sudo rm -fr ~/Library/Caches/CocoaPods/
$ rm -fr ~/.cocoapods/repos/master/
$ sudo rm -fr Pods/
$ sudo gem install cocoapods
$ pod setup

然后运行$ pod install ..希望它有效