[IOS] on a number of issues cocoapods

1. After updating Mac systems, pod search error

After updating the system, sometimes using the pod search the following error appears. I was in search mj

 

 

 

At this time we can execute directly pod repo remove trunk remove the trunk source, pod search on all normal!

The reason for this problem is generally the local trunk.

But then again we encounter the following problems

 

This problem is solved in the previous 1.8.0 release us directly pod setup but after 1.8.0 there is no use.

I had good pod setup times useless, and later on directly after a pod init file, add a common pod inside the library, pod install it automatically updates the trunk to the local library.

 

2. Uninstall cocoapods

First uninstall cocoapods we can use the following code 

sudo gem uninstall cocoapods

But sometimes the following error.

Error:  While executing gem ...  (Gem::FilePermissionError)

You don't have write permissions for the /usr/bin directory.

This time we need to use this one statement the.

sudo gem uninstall -n /usr/local/bin cocoapods

 

 

 

The next step is to install a nice view local resources cocoapods

gem list --local | grep cocoapods
cocoapods-core (1.8.4)
cocoapods-deintegrate (1.0.4)
cocoapods-downloader (1.2.2)
cocoapods-plugins (1.0.0)
cocoapods-search (1.0.0)
cocoapods-stats (1.1.0)
cocoapods-trunk (1.4.1)
cocoapods-try (1.1.0)
这些事我检索出来的文件,接下来就是一一删除。
sudo gem uninstall cocoapods-core
sudo gem uninstall cocoapods-deintegrate
sudo gem uninstall cocoapods-downloader
sudo gem uninstall cocoapods-plugins
sudo gem uninstall cocoapods-search
sudo gem uninstall cocoapods-stats
sudo gem uninstall cocoapods-trunk
sudo gem uninstall cocoapods-try

 这样也就彻底卸载了cocoapods

3.升级cocoapods

第一步升级gem:sudo gem update -n /usr/local/bin --system
第二步执行安装操作:sudo gem install -n /usr/local/bin cocoapods

 

Guess you like

Origin www.cnblogs.com/weicyNo-1/p/12044376.html