A lot of answers are that deleting ~ / Library / Caches / CocoaPods / search_index.json didn't work
Useful answers:
https://blog.csdn.net/qq_35827461/article/details/89448062
https://www.jianshu.com/p/dbfdece084d5
1, pod repo remove master
2, cd ~ / .cocoapods / repos
3, git clone --depth 1 https://github.com/CocoaPods/Specs.git master
4, rm ~/Library/Caches/CocoaPods/search_index.json
5, pod search afnetworking