2

我无法为我的 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
4

2 回答 2

0

你的顶部有源Podfile吗?

source 'https://github.com/CocoaPods/Specs.git'
于 2016-09-15T08:29:42.207 回答
-1

做这些:

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

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

于 2018-06-04T10:45:36.797 回答