Troubleshooting pod lib lint

You just ran

pod lib lint YourCococapod.podspec

And you are getting weird errors that are preventing validation. Here are things that you can do.

How it works:

It first goes to the podspec within your current directory. If its not there, you will get the following error:

Last part is cut off for privacy reasons

You can either cd out to a higher up directory, or you can drag in the .podspec to the current directory. Use pwd to see where you are.

If it cannot find a dependency you will get this:

‘YourDependency’, ‘its path’

If your cocoapod has a dependency on a private pod this error might not be an issue, and you can just ignore this.

What you can do:

  • Check and make sure every spelling, capitalization and syntax is correct in both your .podspec and Podfile.
  • Make sure you provide the correct source in both your .podspec and Podfile. The podspec source should point to your .git that stores your project. The Podfil should have the source as the master repo that holds podspecs.
  • You can list multiple sources for your Podfile. You might want to include your fork that holds you podspec.
  • Run the following to get more detailed explanations.
use pod lib lint --verbose
  • Make sure you list dependency pods in your property s.dependency no need for the = . You might notice your podfile pod hooks align with your podspec’s dependency property.
Like what you read? Give Scott a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.