Cocoapods Error: [!] Unable to find a specification for `$podname`


#1

Hey Guys,

I’m using a cocoapod with a custom nativescript plugin in my project. When I try to build the project, I see:

[!] Unable to find a specification for nameOfPodHere

Any ideas?

In my podfile I simply reference the pod’s name, in this case 'SwiftyCam. For some reason it can’t find the reference even though everything seems correct.


#2

This can happen from time to time when the local Cocoapods repo gets stale containing older specs. You can do the following to just remove the local repo of specs:

sudo rm -fr ~/.cocoapods/repos/master

As of CocoaPods 1.0, you will then get this error if you try to run your project:

You have either:
 * out-of-date source repos which you can update with `pod repo update`.
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.
Processing node_modules failed. Error: Command pod failed with exit code 1

As mentioned, just run:

pod repo update

And then you will be all set.


#3

this worked, installs the pods just fine now.

Thanks!