3

I have successfully pushed my pod to CocoaPods two three days ago with version number 0.1.0. Yesterday I had to add some new features to the pod, so I have made changes in Xcode, Created multiple Swift files, modified existing code.

Then I know that, this version should go out as a new tag. So I have created a new tag 0.1.1. and pushed changes to remote repo in GitHub. Also changed tag in podspec file. GitHub master repo and 0.1.1 has the same code which is equal to the local code. And there are no warnings or errors in Xcode, everything was perfect.

Then I have to test my pod, I ran pod lib lint, which successfully passed validation. When I ran pod spec lint, it gave me multiple Xcode errors and warnings which I have solved hours ago.

As I could see that pod spec lint is not looking into current swift files or into newly modified code. It shown errors and warnings related old code, And podspec file has proper version and tag. Remote repo is up to date in master and also in 0.1.1.

What could be the possible solution for this? Why this is happening? My Xcode swift files have completely changed but pod spec lint is pointing to some old code, How?

Is it due CocoaPods cache problem ?

2 Answers 2

2

got the same problem, cocoapods cache is here:

cd /Users/<#ur user name#>/Library/Caches/CocoaPods/Pods 

just delete /Pods directory and pod lint will work

or

pod cache clean YOUR_POD_NAME 
Sign up to request clarification or add additional context in comments.

Comments

1

Find the cocoapods working directory, remove it and then try to lint again:

$ find /private/var/folders -type d -name CocoaPods 2>/dev/null -exec rm -rf {} \; 

3 Comments

Could you please explain what happens when I do this?
I have actually solved it by adding a new dependency. Later updating pod, pushing code changes, the pod spec lint passed validation.
@AlvinVarghese this code snippet searches for and deletes cocoapod's working directory for linting. you may think of it as a temporary directory where the actual linting is performed. removing this directory should solve " but pod spec lint is pointing to some old code, How?"