Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
202 views
in Technique[技术] by (71.8m points)

ios - What exactly does `pod repo update` do?

I'm following an internet tutorial on Firebase and as part of it, I had to do some work on the command line. I'm pretty comfortable with the command line, but I'm unfamiliar with Cocoapods. I ran pod repo update but after doing so I realized I ran it on my entire Documents folder of my Mac instead of the folder that contained my project. I took over 20 mins to execute and it printed out literally thousands of things when it finally completed, some of which included "create" and "deleted". I was kind of concerned- would run this command have modified anything in my Documents besides the Firebase project? And what does pod repo update even do for that matter?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

As per the documentation pod repo update updates the spec repos located at ~/.cocoapods/repos in your home folder.

Updates the local clone of the spec-repo NAME. If NAME is omitted this will update all spec-repos in ~/.cocoapods/repos.

The repo is basically a list of all pods and versions available. I have just encountered an error in our CI builds because the repo did not include a spec for a library I have just added. By running pod repo update it now knows of this newer version and can continue to install it.

So to answer your question.. Running pod repo update in your documents folder will not do anything in that folder. It will update its pod spec references in your ~/.cocoapods/repos folder only.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...