Unable to find a specification in CocoaPods

Solution 1:

I suppose that there is a problem with your pod master repo. Delete it and download it again.

You can do:

pod repo remove master
pod setup
pod install

Or:

sudo rm -fr ~/.cocoapods/repos/master
pod setup
pod install

Solution 2:

For me it was an issue with finding the spec, not the spec itself. I needed to add a source link to the Podfile, see Podfile documentation

Cocoapods recently added the need to link to the repo that holds the pod spec file you are looking for, the default is:

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

You may need to add multiple source links if you are using more obscure or homemade pods.

Solution 3:

Instead of:

s.source       = { :git => "[email protected]:myrepo/Podspecs.git", :branch => "xyz" }

Write this: Don't forget the tag...

s.source       = { :git => "https://github.com/myrepo/Podspecs.git", :branch => "xyz",
                   :tag => s.version.to_s }