Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
548 views
in Technique[技术] by (71.8m points)

ios - Cocoapods - Unable to find a Specification for [Github framework]

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

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

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

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...