Cocoapods - 无法找到[Github框架]的规范 [英] Cocoapods - Unable to find a Specification for [Github framework]

查看:167
本文介绍了Cocoapods - 无法找到[Github框架]的规范的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当尝试将 pod install 一个新的 Podfile 添加到现有的Xcode(iOS)项目中时,我得到以下内容来自终端的错误消息: [!]无法找到'XCDYouTubeKit(〜> 2.1.1)'的规范。我尝试加载的Podfile如下所示:

When trying to pod install a new Podfile into an existing Xcode (iOS) project, I get the following error message from Terminal: [!] Unable to find a specification for 'XCDYouTubeKit (~> 2.1.1)'. The Podfile that I was trying to load looks like this:

# Uncomment this line to define a global platform for your project
# platform :ios, '6.0'

target 'DemoApp' do

pod 'XCDYouTubeKit', '~> 2.1.1'

end

target 'DemoAppTests' do

end

target 'TheDayByDay' do

end

此外,我的Xcode项目的文件结构如下:

Additionally, the file structure for my Xcode project is as follows:

DemoApp
     Podfile (file)
     Pods (directory)
     DemoApp (directory)
     DemoApp.xcodeproj (file)
     DemoAppTests (directory)

这个安装怎么样?不工作?我哪里错了?我正在运行Cocoapods 0.35.0 。我错过了 pod规范文件吗?我不明白它是什么或这样一个文件的文件结构是什么样的。

What about this installation is not working? Where am I going wrong? I'm running Cocoapods 0.35.0. Am I missing a pod spec file? I don't understand what it is or what the file structure of such a file would like.

推荐答案

引用你的对话评论,你要执行 sudo rm -fr~ / .cocoapods / repos / master 因为它会删除你计算机中的所有虚假和损坏的回购在你重做 pod setup 之后给它一个重新填充的机会,这将恢复你的新Cocoapods设置。此外,您还需要指定新版Xcode所在的 sudo xcode-select --switch /applications/Xcode.app 。这只是我必须做的另一个设置过程来完成修复。从那里,只需执行 pod setup ,然后设置为运行 pod install 来集成您想要的所有库!

Citing your conversation in the comments, you'll want to execute sudo rm -fr ~/.cocoapods/repos/master because it'll remove all the bogus and corrupted repos that you have in your computer to give it a chance to repopulate after you redo pod setup, which'll reinstate you with a fresh Cocoapods setup. Additionally, you'll want to specify sudo xcode-select --switch /applications/Xcode.app where your new version of Xcode is. That was just another setup procedure that I had to do to complete the fix. From there, just do pod setup and you're set to run pod install to integrate all the libraries that you want!

这篇关于Cocoapods - 无法找到[Github框架]的规范的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆