Recently, when I was building my own database DFAXUIElement, I accidentally found a bug in the code and needed to change it. After you’ve solved the bug flawlessly and committed to Cocoapod. The current version should be 1.0.5. However, after pod install, the code is still 1.0.4.

Ps: One word in. My self-built library is a packaged Swift library that I implemented on AXUIElement. In this way, you can call AXUIElement in MacOS to get the elements of each program (including all elements such as forms). You can have a look if you likeThe base address

Then I ran pod Search and found that the current version was still 1.0.4. Is very afflictive !!!!!!! Hair also dropped a lot !!!!!

At this time Baidu is really a little effect!! Under the crazy Baidu, there is still no solution after. I think of Uncle Gu! Then Google!

Sure enough, Google is more reliable. In my practice and crazy trial and error, finally came up with the following solutions. You can also use the following methods for screening

1. The simplest way is to delete the search index

rm ~/Library/Caches/CocoaPods/search_index.json
pod search DFAXUIElement
Copy the code

2. The cache of the local library is not updated. Delete the local cache and re-setup. This approach is strongly recommended. The method is as follows:

pod repo remove master
cd ~/.cocoapods/repos
git clone --depth 1 https://github.com/CocoaPods/Specs.git master
rm ~/Library/Caches/CocoaPods/search_index.json
Copy the code

If git Clone is slow, please refer to my other article

3. If none of the above has worked out for you, get it back. Methods the following

pod repo update --verbose
Copy the code

4. Update the local index file. This method is least recommended. Because I only get it right once with this one time.

pod update --no-repo-update
Copy the code

5. If you haven’t solved it yet! Then do something big! Clear all caches and re-index.

pod cache clean --all
rm -rf ~/Library/Caches/CocoaPods
pod repo update 
Copy the code

If you’re lucky enough to be able to help you out, please give a like and follow. thank you